[BACK]Return to aclocal.m4 CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gmp

Annotation of OpenXM_contrib/gmp/aclocal.m4, Revision 1.1.1.3

1.1.1.3 ! ohara       1: # aclocal.m4 generated automatically by aclocal 1.5
1.1       maekawa     2:
1.1.1.3 ! ohara       3: # Copyright 1996, 1997, 1998, 1999, 2000, 2001
        !             4: # Free Software Foundation, Inc.
        !             5: # This file is free software; the Free Software Foundation
        !             6: # gives unlimited permission to copy and/or distribute it,
        !             7: # with or without modifications, as long as this notice is preserved.
        !             8:
        !             9: # This program is distributed in the hope that it will be useful,
        !            10: # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
        !            11: # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
        !            12: # PARTICULAR PURPOSE.
1.1       maekawa    13:
                     14: dnl  GMP specific autoconf macros
                     15:
                     16:
1.1.1.3 ! ohara      17: dnl  Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
1.1       maekawa    18: dnl
                     19: dnl  This file is part of the GNU MP Library.
                     20: dnl
                     21: dnl  The GNU MP Library is free software; you can redistribute it and/or modify
                     22: dnl  it under the terms of the GNU Lesser General Public License as published
                     23: dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
                     24: dnl  your option) any later version.
                     25: dnl
                     26: dnl  The GNU MP Library is distributed in the hope that it will be useful, but
                     27: dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     28: dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
                     29: dnl  License for more details.
                     30: dnl
                     31: dnl  You should have received a copy of the GNU Lesser General Public License
                     32: dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write to
                     33: dnl  the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
                     34: dnl  MA 02111-1307, USA.
                     35:
                     36:
1.1.1.3 ! ohara      37: define(X86_PATTERN,
        !            38: [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-*]])
        !            39:
        !            40: define(POWERPC64_PATTERN,
        !            41: [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-*]])
        !            42:
        !            43:
        !            44: dnl  GMP_STRIP_PATH(subdir)
        !            45: dnl  ----------------------
        !            46: dnl  Strip entries */subdir from $path.
        !            47:
        !            48: define(GMP_STRIP_PATH,
        !            49: [tmp_path=
        !            50: for i in $path; do
        !            51:   case $i in
        !            52:     */$1) ;;
        !            53:     *) tmp_path="$tmp_path $i" ;;
        !            54:   esac
        !            55: done
        !            56: path="$tmp_path"
        !            57: ])
        !            58:
        !            59:
        !            60: dnl  GMP_INCLUDE_GMP_H
        !            61: dnl  -----------------
        !            62: dnl  Expand to the right way to #include gmp-h.in.  This must be used
        !            63: dnl  instead of gmp.h, since that file isn't generated until the end of the
        !            64: dnl  configure.
        !            65: dnl
        !            66: dnl  GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB starts as a dummy, but gets
        !            67: dnl  redefined in GMP_C_SIZES when the right value is known.
        !            68:
        !            69: define(GMP_INCLUDE_GMP_H,
        !            70: [[#define __GMP_WITHIN_CONFIGURE 1   /* ignore template stuff */
        !            71: #define GMP_NAIL_BITS $GMP_NAIL_BITS]
        !            72: GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB
        !            73: [$DEFN_LONG_LONG_LIMB
        !            74: #include "$srcdir/gmp-h.in"]
        !            75: ])
        !            76:
        !            77: define(GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB,
        !            78: [[#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */
        !            79: #define GMP_LIMB_BITS 123]])
        !            80:
        !            81:
1.1       maekawa    82: dnl  GMP_HEADER_GETVAL(NAME,FILE)
                     83: dnl  ----------------------------
1.1.1.3 ! ohara      84: dnl  Expand at autoconf time to the value of a "#define NAME" from the given
        !            85: dnl  FILE.  The regexps here aren't very rugged, but are enough for gmp.
1.1       maekawa    86: dnl  /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
                     87:
                     88: define(GMP_HEADER_GETVAL,
                     89: [patsubst(patsubst(
                     90: esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
                     91: [^.*$1[        ]+],[]),
                     92: [[
                     93:        ]*$],[])])
                     94:
                     95:
                     96: dnl  GMP_VERSION
                     97: dnl  -----------
1.1.1.3 ! ohara      98: dnl  The gmp version number, extracted from the #defines in gmp-h.in at
        !            99: dnl  autoconf time.  Two digits like 3.0 if patchlevel <= 0, or three digits
        !           100: dnl  like 3.0.1 if patchlevel > 0.
1.1       maekawa   101:
                    102: define(GMP_VERSION,
1.1.1.3 ! ohara     103: [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
        !           104: .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
        !           105: ifelse(m4_eval(GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in) > 0),1,
        !           106: [.GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])])
        !           107:
        !           108:
        !           109: dnl  GMP_SUBST_CHECK_FUNCS(func,...)
        !           110: dnl  ------------------------------
        !           111: dnl  Setup an AC_SUBST of HAVE_FUNC_01 for each argument.
        !           112:
        !           113: AC_DEFUN(GMP_SUBST_CHECK_FUNCS,
        !           114: [m4_if([$1],,,
        !           115: [_GMP_SUBST_CHECK_FUNCS(ac_cv_func_[$1],HAVE_[]m4_translit([$1],[a-z],[A-Z])_01)
        !           116: GMP_SUBST_CHECK_FUNCS(m4_shift($@))])])
        !           117:
        !           118: dnl  Called: _GMP_SUBST_CHECK_FUNCS(cachvar,substvar)
        !           119: AC_DEFUN(_GMP_SUBST_CHECK_FUNCS,
        !           120: [case $[$1] in
        !           121: yes) AC_SUBST([$2],1) ;;
        !           122: no)  [$2]=0 ;;
        !           123: esac
        !           124: ])
1.1       maekawa   125:
                    126:
1.1.1.3 ! ohara     127: dnl  GMP_SUBST_CHECK_HEADERS(foo.h,...)
        !           128: dnl  ----------------------------------
        !           129: dnl  Setup an AC_SUBST of HAVE_FOO_H_01 for each argument.
        !           130:
        !           131: AC_DEFUN(GMP_SUBST_CHECK_HEADERS,
        !           132: [m4_if([$1],,,
        !           133: [_GMP_SUBST_CHECK_HEADERS(ac_cv_header_[]m4_translit([$1],[./],[__]),
        !           134: HAVE_[]m4_translit([$1],[a-z./],[A-Z__])_01)
        !           135: GMP_SUBST_CHECK_HEADERS(m4_shift($@))])])
        !           136:
        !           137: dnl  Called: _GMP_SUBST_CHECK_HEADERS(cachvar,substvar)
        !           138: AC_DEFUN(_GMP_SUBST_CHECK_HEADERS,
        !           139: [case $[$1] in
        !           140: yes) AC_SUBST([$2],1) ;;
        !           141: no)  [$2]=0 ;;
        !           142: esac
        !           143: ])
        !           144:
        !           145:
        !           146: dnl  GMP_COMPARE_GE(A1,B1, A2,B2, ...)
        !           147: dnl  ---------------------------------
        !           148: dnl  Compare two version numbers A1.A2.etc and B1.B2.etc.  Set
        !           149: dnl  $gmp_compare_ge to yes or no accoring to the result.  The A parts
        !           150: dnl  should be variables, the B parts fixed numbers.  As many parts as
        !           151: dnl  desired can be included.  An empty string in an A part is taken to be
        !           152: dnl  zero, the B parts should be non-empty and non-zero.
        !           153: dnl
        !           154: dnl  For example,
        !           155: dnl
        !           156: dnl      GMP_COMPARE($major,10, $minor,3, $subminor,1)
        !           157: dnl
        !           158: dnl  would test whether $major.$minor.$subminor is greater than or equal to
        !           159: dnl  10.3.1.
        !           160:
        !           161: AC_DEFUN(GMP_COMPARE_GE,
        !           162: [gmp_compare_ge=no
        !           163: GMP_COMPARE_GE_INTERNAL($@)
        !           164: ])
        !           165:
        !           166: AC_DEFUN(GMP_COMPARE_GE_INTERNAL,
        !           167: [ifelse(len([$3]),0,
        !           168: [if test -n "$1" && test "$1" -ge $2; then
        !           169:   gmp_compare_ge=yes
        !           170: fi],
        !           171: [if test -n "$1"; then
        !           172:   if test "$1" -gt $2; then
        !           173:     gmp_compare_ge=yes
        !           174:   else
        !           175:     if test "$1" -eq $2; then
        !           176:       GMP_COMPARE_GE_INTERNAL(m4_shift(m4_shift($@)))
        !           177:     fi
        !           178:   fi
        !           179: fi])
        !           180: ])
        !           181:
        !           182:
        !           183: dnl  GMP_PROG_AR
        !           184: dnl  -----------
        !           185: dnl  GMP additions to $AR.
1.1       maekawa   186: dnl
1.1.1.3 ! ohara     187: dnl  A cross-"ar" may be necessary when cross-compiling since the build
        !           188: dnl  system "ar" might try to interpret the object files to build a symbol
        !           189: dnl  table index, hence the use of AC_CHECK_TOOL.
        !           190: dnl
        !           191: dnl  A user-selected $AR is always left unchanged.  AC_CHECK_TOOL is still
        !           192: dnl  run to get the "checking" message printed though.
        !           193: dnl
        !           194: dnl  $AR_FLAGS is set to "cq" rather than leaving it to libtool "cru".  The
        !           195: dnl  latter fails when libtool goes into piecewise mode and is unlucky
        !           196: dnl  enough to have two same-named objects in separate pieces, as happens
        !           197: dnl  for instance to random.o (and others) on vax-dec-ultrix4.5.  Naturally
        !           198: dnl  a user-selected $AR_FLAGS is left unchanged.
        !           199:
        !           200: AC_DEFUN(GMP_PROG_AR,
        !           201: [dnl  Want to establish $AR before libtool initialization.
        !           202: AC_BEFORE([$0],[AC_PROG_LIBTOOL])
        !           203: gmp_user_AR=$AR
        !           204: AC_CHECK_TOOL(AR, ar, ar)
        !           205: if test -z "$gmp_user_AR"; then
        !           206:                         eval arflags=\"\$ar${abi1}_flags\"
        !           207:   test -n "$arflags" || eval arflags=\"\$ar${abi2}_flags\"
        !           208:   if test -n "$arflags"; then
        !           209:     AC_MSG_CHECKING([for extra ar flags])
        !           210:     AR="$AR $arflags"
        !           211:     AC_MSG_RESULT([$arflags])
        !           212:   fi
        !           213: fi
        !           214: if test -z "$AR_FLAGS"; then
        !           215:   AR_FLAGS=cq
        !           216: fi
        !           217: ])
        !           218:
        !           219:
        !           220: dnl  GMP_PROG_HOST_CC
        !           221: dnl  ----------------
        !           222: dnl  Establish a value for $HOST_CC.
        !           223: dnl
        !           224: dnl  Any HOST_CC already set is used without testing.  Likewise any
        !           225: dnl  CC_FOR_BUILD is used without testing.  CC_FOR_BUILD is the new name for
        !           226: dnl  a build system compiler, see configfsf.guess.
        !           227:
        !           228: AC_DEFUN(GMP_PROG_HOST_CC,
        !           229: [AC_BEFORE([$0],[AC_PROG_LIBTOOL])
        !           230: AC_REQUIRE([AC_PROG_CC])
        !           231: AC_CACHE_CHECK([for HOST_CC build system compiler],
        !           232:                gmp_cv_prog_host_cc,
        !           233: [if test -n "$HOST_CC"; then
        !           234:   gmp_cv_prog_host_cc=$HOST_CC
        !           235: else
        !           236:   if test -n "$CC_FOR_BUILD"; then
        !           237:     gmp_cv_prog_host_cc=$CC_FOR_BUILD
        !           238:   else
        !           239:     cat >conftest.c <<EOF
        !           240: int main () { exit(0); }
        !           241: EOF
        !           242:     for c in "$CC" cc gcc c89; do
        !           243:       echo "trying $c" >&AC_FD_CC
        !           244:       if ($c conftest.c -o conftest) >&AC_FD_CC 2>&1; then
        !           245:         if (./conftest) >&AC_FD_CC 2>&1; then
        !           246:           gmp_cv_prog_host_cc=$c
        !           247:           break
        !           248:         fi
        !           249:       fi
        !           250:     done
        !           251:     rm -f conftest*
        !           252:     if test -z "$gmp_cv_prog_host_cc"; then
        !           253:       AC_MSG_ERROR([cannot find a build system compiler])
        !           254:     fi
        !           255:   fi
        !           256: fi
        !           257: ])
        !           258: HOST_CC=$gmp_cv_prog_host_cc
        !           259: ])
        !           260:
        !           261:
        !           262: dnl  GMP_PROG_LEX
        !           263: dnl  ------------
        !           264: dnl  AC_PROG_LEX bombs if $LEX is set to ${am_missing_run}flex by
        !           265: dnl  AM_PROG_LEX.  It needs to see LEX=: if lex is missing.  Avoid this by
        !           266: dnl  running AC_PROG_LEX first and then using "missing".
        !           267: dnl
        !           268: dnl  FIXME: This can be removed and just AM_PROG_LEX used, one that macro
        !           269: dnl  works properly.
        !           270:
        !           271: AC_DEFUN(GMP_PROG_LEX,
        !           272: [AC_REQUIRE([AC_PROG_LEX])
        !           273: if test "$LEX" = :; then
        !           274:   LEX=${am_missing_run}flex
        !           275: fi
        !           276: ])
        !           277:
        !           278:
        !           279: dnl  GMP_PROG_M4
        !           280: dnl  -----------
1.1       maekawa   281: dnl  Find a working m4, either in $PATH or likely locations, and setup $M4
                    282: dnl  and an AC_SUBST accordingly.  If $M4 is already set then it's a user
                    283: dnl  choice and is accepted with no checks.  GMP_PROG_M4 is like
1.1.1.3 ! ohara     284: dnl  AC_PATH_PROG or AC_CHECK_PROG, but tests each m4 found to see if it's
        !           285: dnl  good enough.
1.1       maekawa   286: dnl
                    287: dnl  See mpn/asm-defs.m4 for details on the known bad m4s.
                    288:
                    289: AC_DEFUN(GMP_PROG_M4,
1.1.1.3 ! ohara     290: [AC_ARG_VAR(M4,[m4 macro processor])
        !           291: AC_CACHE_CHECK([for suitable m4],
1.1       maekawa   292:                 gmp_cv_prog_m4,
                    293: [if test -n "$M4"; then
                    294:   gmp_cv_prog_m4="$M4"
                    295: else
                    296:   cat >conftest.m4 <<\EOF
1.1.1.3 ! ohara     297: dnl  Must protect this against being expanded during autoconf m4!
        !           298: dnl  Dont put "dnl"s in this as autoconf will flag an error for unexpanded
        !           299: dnl  macros.
        !           300: [define(dollarhash,``$][#'')ifelse(dollarhash(x),1,`define(t1,Y)',
1.1       maekawa   301: ``bad: $][# not supported (SunOS /usr/bin/m4)
1.1.1.3 ! ohara     302: '')ifelse(eval(89),89,`define(t2,Y)',
1.1       maekawa   303: `bad: eval() doesnt support 8 or 9 in a constant (OpenBSD 2.6 m4)
1.1.1.3 ! ohara     304: ')ifelse(t1`'t2,YY,`good
        !           305: ')]
        !           306: EOF
        !           307: dnl ' <- balance the quotes for emacs sh-mode
        !           308:   echo "trying m4" >&AC_FD_CC
        !           309:   gmp_tmp_val=`(m4 conftest.m4) 2>&AC_FD_CC`
        !           310:   echo "$gmp_tmp_val" >&AC_FD_CC
1.1       maekawa   311:   if test "$gmp_tmp_val" = good; then
                    312:     gmp_cv_prog_m4="m4"
                    313:   else
                    314:     IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS=":"
                    315: dnl $ac_dummy forces splitting on constant user-supplied paths.
                    316: dnl POSIX.2 word splitting is done only on the output of word expansions,
                    317: dnl not every word.  This closes a longstanding sh security hole.
                    318:     ac_dummy="$PATH:/usr/5bin"
                    319:     for ac_dir in $ac_dummy; do
                    320:       test -z "$ac_dir" && ac_dir=.
1.1.1.3 ! ohara     321:       echo "trying $ac_dir/m4" >&AC_FD_CC
        !           322:       gmp_tmp_val=`($ac_dir/m4 conftest.m4) 2>&AC_FD_CC`
        !           323:       echo "$gmp_tmp_val" >&AC_FD_CC
1.1       maekawa   324:       if test "$gmp_tmp_val" = good; then
                    325:         gmp_cv_prog_m4="$ac_dir/m4"
                    326:         break
                    327:       fi
                    328:     done
                    329:     IFS="$ac_save_ifs"
                    330:     if test -z "$gmp_cv_prog_m4"; then
                    331:       AC_MSG_ERROR([No usable m4 in \$PATH or /usr/5bin (see config.log for reasons).])
                    332:     fi
                    333:   fi
                    334:   rm -f conftest.m4
                    335: fi])
                    336: M4="$gmp_cv_prog_m4"
                    337: AC_SUBST(M4)
                    338: ])
                    339:
                    340:
1.1.1.3 ! ohara     341: dnl  GMP_M4_M4WRAP_SPURIOUS
        !           342: dnl  ----------------------
        !           343: dnl  Check for spurious output from m4wrap(), as described in mpn/asm-defs.m4.
        !           344: dnl
        !           345: dnl  The following systems have been seen with the problem.
        !           346: dnl
        !           347: dnl  - Unicos alpha, but its assembler doesn't seem to mind.
        !           348: dnl  - MacOS X Darwin, its assembler fails.
        !           349: dnl  - NetBSD 1.4.1 m68k, and gas 1.92.3 there gives a warning and ignores
        !           350: dnl    the bad last line since it doesn't have a newline.
        !           351: dnl  - NetBSD 1.4.2 alpha, but its assembler doesn't seem to mind.
        !           352: dnl
        !           353: dnl  Enhancement: Maybe this could be in GMP_PROG_M4, and attempt to prefer
        !           354: dnl  an m4 with a working m4wrap, if it can be found.
        !           355:
        !           356: AC_DEFUN(GMP_M4_M4WRAP_SPURIOUS,
        !           357: [AC_REQUIRE([GMP_PROG_M4])
        !           358: AC_CACHE_CHECK([if m4wrap produces spurious output],
        !           359:                gmp_cv_m4_m4wrap_spurious,
        !           360: [# hide the d-n-l from autoconf's error checking
        !           361: tmp_d_n_l=d""nl
        !           362: cat >conftest.m4 <<EOF
        !           363: [changequote({,})define(x,)m4wrap({x})$tmp_d_n_l]
        !           364: EOF
        !           365: echo test input is >&AC_FD_CC
        !           366: cat conftest.m4 >&AC_FD_CC
        !           367: tmp_chars=`$M4 conftest.m4 | wc -c`
        !           368: echo produces $tmp_chars chars output >&AC_FD_CC
        !           369: rm -f conftest.m4
        !           370: if test $tmp_chars = 0; then
        !           371:   gmp_cv_m4_m4wrap_spurious=no
        !           372: else
        !           373:   gmp_cv_m4_m4wrap_spurious=yes
        !           374: fi
        !           375: ])
        !           376: GMP_DEFINE_RAW(["define(<M4WRAP_SPURIOUS>,<$gmp_cv_m4_m4wrap_spurious>)"])
        !           377: ])
        !           378:
        !           379:
        !           380: dnl  GMP_PROG_NM
        !           381: dnl  -----------
        !           382: dnl  GMP additions to libtool AC_PROG_NM.
        !           383: dnl
        !           384: dnl  Note that if AC_PROG_NM can't find a working nm it still leaves
        !           385: dnl  $NM set to "nm", so $NM can't be assumed to actually work.
        !           386: dnl
        !           387: dnl  A user-selected $NM is always left unchanged.  AC_PROG_NM is still run
        !           388: dnl  to get the "checking" message printed though.
        !           389:
        !           390: AC_DEFUN(GMP_PROG_NM,
        !           391: [dnl  Make sure we're the first to call AC_PROG_NM, so our extra flags are
        !           392: dnl   used by everyone.
        !           393: AC_BEFORE([$0],[AC_PROG_NM])
        !           394: gmp_user_NM=$NM
        !           395: AC_PROG_NM
        !           396:
        !           397: # FIXME: When cross compiling (ie. $ac_tool_prefix not empty), libtool
        !           398: # defaults to plain "nm" if a "${ac_tool_prefix}nm" is not found.  In this
        !           399: # case run it again to try the native "nm", firstly so that likely locations
        !           400: # are searched, secondly so that -B or -p are added if necessary for BSD
        !           401: # format.  This is necessary for instance on OSF with "./configure
        !           402: # --build=alphaev5-dec-osf --host=alphaev6-dec-osf".
        !           403: #
        !           404: if test -z "$gmp_user_NM" && test -n "$ac_tool_prefix" && test "$NM" = nm; then
        !           405:   $as_unset lt_cv_path_NM
        !           406:   gmp_save_ac_tool_prefix=$ac_tool_prefix
        !           407:   ac_tool_prefix=
        !           408:   NM=
        !           409:   AC_PROG_NM
        !           410:   ac_tool_prefix=$gmp_save_ac_tool_prefix
        !           411: fi
        !           412:
        !           413: if test -z "$gmp_user_NM"; then
        !           414:                         eval nmflags=\"\$nm${abi1}_flags\"
        !           415:   test -n "$nmflags" || eval nmflags=\"\$nm${abi2}_flags\"
        !           416:   if test -n "$nmflags"; then
        !           417:     AC_MSG_CHECKING([for extra nm flags])
        !           418:     NM="$NM $nmflags"
        !           419:     AC_MSG_RESULT([$nmflags])
        !           420:   fi
        !           421: fi
        !           422: ])
        !           423:
        !           424:
        !           425: dnl  GMP_PROG_CC_WORKS(cc+cflags,[ACTION-IF-WORKS][,ACTION-IF-NOT-WORKS])
        !           426: dnl  --------------------------------------------------------------------
        !           427: dnl  Check if cc+cflags can compile and link.
        !           428: dnl
        !           429: dnl  This test is designed to be run repeatedly with different cc+cflags
        !           430: dnl  selections, so the result is not cached.
        !           431: dnl
        !           432: dnl  For a native build, meaning $cross_compiling == no, we require that the
        !           433: dnl  generated program will run.  This is the same as AC_PROG_CC does in
        !           434: dnl  _AC_COMPILER_EXEEXT_WORKS, and checking here will ensure we don't pass
        !           435: dnl  a CC/CFLAGS combination that it rejects.
        !           436: dnl
        !           437: dnl  sparc-*-solaris2.7 can compile ABI=64 but won't run it if the kernel
        !           438: dnl  was booted in 32-bit mode.  The effect of requiring the compiler output
        !           439: dnl  will run is that a plain native "./configure" falls back on ABI=32, but
        !           440: dnl  ABI=64 is still available as a cross-compile.
        !           441:
        !           442: AC_DEFUN(GMP_PROG_CC_WORKS,
        !           443: [AC_MSG_CHECKING([compiler $1])
        !           444: cat >conftest.c <<EOF
        !           445:
        !           446: /* The following provokes an internal error from gcc 2.95.2 -mpowerpc64
        !           447:    (without -maix64), hence detecting an unusable compiler */
        !           448: void *g() { return (void *) 0; }
        !           449: void *f() { return g(); }
        !           450:
        !           451: /* The following provokes an invalid instruction syntax from i386 gcc
        !           452:    -march=pentiumpro on Solaris 2.8.  The native sun assembler
        !           453:    requires a non-standard syntax for cmov which gcc (as of 2.95.2 at
        !           454:    least) doesn't know.  */
        !           455: int n;
        !           456: int cmov () { return (n >= 0 ? n : 0); }
        !           457:
        !           458: /* The following provokes a linker invocation problem with gcc 3.0.3
        !           459:    on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630".  The -mcpu=630
        !           460:    option causes gcc to incorrectly select the 32-bit libgcc.a, not
        !           461:    the 64-bit one, and consequently it misses out on the __fixunsdfdi
        !           462:    helper (double -> uint64 conversion).  */
        !           463: double d;
        !           464: unsigned long gcc303 () { return (unsigned long) d; }
        !           465:
        !           466: int main () { return 0; }
        !           467: EOF
        !           468: gmp_prog_cc_works=no
        !           469: gmp_compile="$1 conftest.c >&AC_FD_CC"
        !           470: if AC_TRY_EVAL(gmp_compile); then
        !           471:   if test "$cross_compiling" = no; then
        !           472:     if AC_TRY_COMMAND([./a.out || ./a.exe || ./conftest]); then
        !           473:       gmp_prog_cc_works=yes
1.1       maekawa   474:     fi
1.1.1.3 ! ohara     475:   else
        !           476:     gmp_prog_cc_works=yes
1.1       maekawa   477:   fi
1.1.1.3 ! ohara     478: fi
        !           479: rm -f conftest* a.out a.exe
        !           480: AC_MSG_RESULT($gmp_prog_cc_works)
        !           481: if test $gmp_prog_cc_works = yes; then
        !           482:   ifelse([$2],,:,[$2])
        !           483: else
        !           484:   ifelse([$3],,:,[$3])
        !           485: fi
        !           486: ])
        !           487:
        !           488:
        !           489: dnl  GMP_PROG_CC_IS_GNU(CC,[ACTIONS-IF-YES][,ACTIONS-IF-NO])
        !           490: dnl  -------------------------------------------------------
        !           491: dnl  Determine whether the given compiler is GNU C.
        !           492: dnl
        !           493: dnl  This test is the same as autoconf _AC_LANG_COMPILER_GNU, but doesn't
        !           494: dnl  cache the result.  The same "ifndef" style test is used, to avoid
        !           495: dnl  problems with syntax checking cpp's used on NeXT and Apple systems.
        !           496:
        !           497: AC_DEFUN(GMP_PROG_CC_IS_GNU,
        !           498: [cat >conftest.c <<EOF
        !           499: #ifndef __GNUC__
        !           500:   choke me
        !           501: #endif
        !           502: EOF
        !           503: gmp_compile="$1 -c conftest.c >&AC_FD_CC"
        !           504: if AC_TRY_EVAL(gmp_compile); then
        !           505:   rm -f conftest*
        !           506:   AC_MSG_CHECKING([whether $1 is gcc])
        !           507:   AC_MSG_RESULT(yes)
        !           508:   ifelse([$2],,:,[$2])
        !           509: else
        !           510:   rm -f conftest*
        !           511:   ifelse([$3],,:,[$3])
        !           512: fi
        !           513: ])
        !           514:
        !           515:
        !           516: dnl  GMP_PROG_CC_IS_XLC(CC,[ACTIONS-IF-YES][,ACTIONS-IF-NO])
        !           517: dnl  -------------------------------------------------------
        !           518: dnl  Determine whether the given compiler is IBM xlc (on AIX).
        !           519: dnl
        !           520: dnl  There doesn't seem to be a preprocessor symbol to test for this, or if
        !           521: dnl  there is one then it's well hidden in xlc 3.1 on AIX 4.3, so just grep
        !           522: dnl  the man page printed when xlc is invoked with no arguments.
        !           523:
        !           524: AC_DEFUN(GMP_PROG_CC_IS_XLC,
        !           525: [gmp_command="$1 2>&1 | grep xlc >/dev/null"
        !           526: if AC_TRY_EVAL(gmp_command); then
        !           527:   AC_MSG_CHECKING([whether $1 is xlc])
        !           528:   AC_MSG_RESULT(yes)
        !           529:   ifelse([$2],,:,[$2])
        !           530: else
        !           531:   ifelse([$3],,:,[$3])
        !           532: fi
        !           533: ])
        !           534:
        !           535:
        !           536: dnl  GMP_HPC_HPPA_2_0(cc,[ACTION-IF-GOOD][,ACTION-IF-BAD])
        !           537: dnl  ---------------------------------------------------------
        !           538: dnl  Find out whether a HP compiler is good enough to generate hppa 2.0.
        !           539: dnl
        !           540: dnl  This test might be repeated for different compilers, so the result is
        !           541: dnl  not cached.
1.1       maekawa   542:
1.1.1.3 ! ohara     543: AC_DEFUN(GMP_HPC_HPPA_2_0,
        !           544: [AC_MSG_CHECKING([whether HP compiler $1 is good for 64-bits])
        !           545: # Bad compiler output:
        !           546: #   ccom: HP92453-01 G.10.32.05 HP C Compiler
        !           547: # Good compiler output:
        !           548: #   ccom: HP92453-01 A.10.32.30 HP C Compiler
        !           549: # Let A.10.32.30 or higher be ok.
        !           550: echo >conftest.c
        !           551: gmp_tmp_vs=`$1 $2 -V -c -o conftest.$OBJEXT conftest.c 2>&1 | grep "^ccom:"`
        !           552: echo "Version string: $gmp_tmp_vs" >&AC_FD_CC
        !           553: rm conftest*
        !           554: gmp_tmp_v1=`echo $gmp_tmp_vs | sed 's/.* .\.\(.*\)\..*\..* HP C.*/\1/'`
        !           555: gmp_tmp_v2=`echo $gmp_tmp_vs | sed 's/.* .\..*\.\(.*\)\..* HP C.*/\1/'`
        !           556: gmp_tmp_v3=`echo $gmp_tmp_vs | sed 's/.* .\..*\..*\.\(.*\) HP C.*/\1/'`
        !           557: echo "Version number: $gmp_tmp_v1.$gmp_tmp_v2.$gmp_tmp_v3" >&AC_FD_CC
        !           558: if test -z "$gmp_tmp_v1"; then
        !           559:   gmp_hpc_64bit=not-applicable
        !           560: else
        !           561:   GMP_COMPARE_GE($gmp_tmp_v1, 10, $gmp_tmp_v2, 32, $gmp_tmp_v3, 30)
        !           562:   gmp_hpc_64bit=$gmp_compare_ge
        !           563: fi
        !           564: AC_MSG_RESULT($gmp_hpc_64bit)
        !           565: if test $gmp_hpc_64bit = yes; then
        !           566:   ifelse([$2],,:,[$2])
        !           567: else
        !           568:   ifelse([$3],,:,[$3])
        !           569: fi
        !           570: ])
        !           571:
        !           572:
        !           573: dnl  GMP_GCC_VERSION_GE(CC,MAJOR[,MINOR[,SUBMINOR]])
        !           574: dnl  -----------------------------------------------
        !           575: dnl  Test whether the version of CC (which must be GNU C) is >=
        !           576: dnl  MAJOR.MINOR.SUBMINOR.  Set $gmp_compare_ge to "yes" or "no"
        !           577: dnl  accordingly, or to "error" if the version number string can't be
        !           578: dnl  parsed.
        !           579: dnl
        !           580: dnl  gcc --version is normally just "2.7.2.3" or "2.95.3" or whatever, but
        !           581: dnl  egcs gives something like "egcs-2.91".  "[a-z-]*" is used to match that
        !           582: dnl  (Solaris 8 sed doesn't support "?" or "*" of a group, like "\(...\)?"
        !           583: dnl  or "\(...\)*".)
        !           584: dnl
        !           585: dnl  There's no caching here, so that different CC's can be tested.
        !           586:
        !           587: AC_DEFUN(GMP_GCC_VERSION_GE,
        !           588: [tmp_version=`($1 --version) 2>&AC_FD_CC`
        !           589: echo "$1 --version '$tmp_version'" >&AC_FD_CC
        !           590:
        !           591: major=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
        !           592: echo "    major '$major'" >&AC_FD_CC
        !           593:
        !           594: ifelse([$3],,,
        !           595: [minor=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
        !           596: echo "    minor '$minor'" >&AC_FD_CC])
        !           597:
        !           598: ifelse([$4],,,
        !           599: [subminor=`(echo "$tmp_version" | sed -n ['s/^[a-z-]*[0-9][0-9]*\.[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p']) 2>&AC_FD_CC`
        !           600: echo "    subminor '$subminor'" >&AC_FD_CC])
        !           601:
        !           602: if test -z "$major"; then
        !           603:   AC_MSG_WARN([unrecognised gcc version string: $tmp_version])
        !           604:   gmp_compare_ge=error
        !           605: else
        !           606:   ifelse([$3],, [GMP_COMPARE_GE($major, $2)],
        !           607:   [ifelse([$4],,[GMP_COMPARE_GE($major, $2, $minor, $3)],
        !           608:                 [GMP_COMPARE_GE($major, $2, $minor, $3, $subminor, $4)])])
        !           609: fi
        !           610: ])
        !           611:
        !           612:
        !           613: dnl  GMP_GCC_ARM_UMODSI(CC,[ACTIONS-IF-GOOD][,ACTIONS-IF-BAD])
        !           614: dnl  ---------------------------------------------------------
        !           615: dnl  gcc 2.95.3 and earlier on arm has a bug in the libgcc __umodsi routine
        !           616: dnl  making "%" give wrong results for some operands, eg. "0x90000000 % 3".
        !           617: dnl  We're hoping it'll be fixed in 2.95.4, and we know it'll be fixed in
        !           618: dnl  gcc 3.
        !           619: dnl
        !           620: dnl  There's only a couple of places gmp cares about this, one is the
        !           621: dnl  size==1 case in mpn/generic/mode1o.c, and this shows up in
        !           622: dnl  tests/mpz/t-jac.c as a wrong result from mpz_kronecker_ui.
        !           623:
        !           624: AC_DEFUN(GMP_GCC_ARM_UMODSI,
        !           625: [AC_MSG_CHECKING([whether ARM gcc unsigned division works])
        !           626: tmp_version=`$1 --version`
        !           627: echo "$tmp_version" >&AC_FD_CC
        !           628: case $tmp_version in
        !           629:   [2.95 | 2.95.[123]])
        !           630:     ifelse([$3],,:,[$3])
        !           631:     gmp_gcc_arm_umodsi_result="no, gcc 2.95.[0123]" ;;
        !           632:   *)
        !           633:     ifelse([$2],,:,[$2])
        !           634:     gmp_gcc_arm_umodsi_result=yes ;;
        !           635: esac
        !           636: AC_MSG_RESULT([$gmp_gcc_arm_umodsi_result])
        !           637: ])
        !           638:
        !           639:
        !           640: dnl  GMP_GCC_MARCH_PENTIUMPRO(CC,[ACTIONS-IF-GOOD][,ACTIONS-IF-BAD])
        !           641: dnl  ---------------------------------------------------------------
        !           642: dnl  mpz/powm.c swox cvs rev 1.4 tickled a bug in gcc 2.95.2 and 2.95.3 when
        !           643: dnl  -march=pentiumpro was used.  The bug was wrong handling of the input to
        !           644: dnl  an ABSIZ(z) expression in mpz_redc().  Fixed in 2.95.4 and pre-release
        !           645: dnl  3.0, and didn't seem to occur in unofficial 2.96, so test for 2.95.4
        !           646: dnl  and up.
        !           647: dnl
        !           648: dnl  This macro is used only once, after finalizing a choice of CC, so the
        !           649: dnl  result is cached.
        !           650:
        !           651: AC_DEFUN(GMP_GCC_MARCH_PENTIUMPRO,
        !           652: [AC_CACHE_CHECK([whether gcc -march=pentiumpro is good],
        !           653:                 gmp_cv_gcc_march_pentiumpro,
        !           654: [GMP_GCC_VERSION_GE([$1], 2,95,4)
        !           655: case $gmp_compare_ge in
        !           656: yes|no)  gmp_cv_gcc_march_pentiumpro=$gmp_compare_ge ;;
        !           657: error|*) gmp_cv_gcc_march_pentiumpro=no ;;
        !           658: esac])
        !           659: if test $gmp_cv_gcc_march_pentiumpro = yes; then
        !           660:   ifelse([$2],,:,[$2])
        !           661: else
        !           662:   ifelse([$3],,:,[$3])
        !           663: fi
        !           664: ])
        !           665:
        !           666:
        !           667: dnl  GMP_GCC_M68K_OPTIMIZE(CCBASE,CC,FLAG-VARIABLE)
        !           668: dnl  ----------------------------------------------
        !           669: dnl  m68k gcc 2.95.x gets an internal compiler error when compiling the
        !           670: dnl  current mpn/generic/gcdext.c (swox cvs rev 1.20) under -O2 or higher,
        !           671: dnl  so just use -O for the offending gcc versions.  Naturally if gcdext.c
        !           672: dnl  gets rearranged or rewritten so the ICE doesn't happen then this can be
        !           673: dnl  removed.
        !           674:
        !           675: AC_DEFUN(GMP_GCC_M68K_OPTIMIZE,
        !           676: [case $host in
        !           677: m68*-*-*)
        !           678:   if test $1 = gcc; then
        !           679:     case `$2 --version` in
        !           680:     2.95*) $3=-O ;;
        !           681:     esac
        !           682:   fi
        !           683:   ;;
        !           684: esac
        !           685: ])
        !           686:
        !           687:
        !           688: dnl  GMP_GCC_MIPS_O32(gcc,[actions-yes][,[actions-no]])
        !           689: dnl  -------------------------------------------------
        !           690: dnl  Test whether gcc supports o32.
        !           691: dnl
        !           692: dnl  gcc 2.7.2.2 only does o32, and doesn't accept -mabi=32.
        !           693: dnl
        !           694: dnl  gcc 2.95 accepts -mabi=32 but it only works on irix5, on irix6 it gives
        !           695: dnl  "cc1: The -mabi=32 support does not work yet".
1.1       maekawa   696:
1.1.1.3 ! ohara     697: AC_DEFUN(GMP_GCC_MIPS_O32,
        !           698: [AC_MSG_CHECKING([whether gcc supports o32])
        !           699: echo 'int x;' >conftest.c
        !           700: echo "$1 -mabi=32 -c conftest.c" >&AC_FD_CC
        !           701: if $1 -mabi=32 -c conftest.c >conftest.out 2>&1; then
        !           702:   result=yes
        !           703: else
        !           704:   cat conftest.out >&AC_FD_CC
        !           705:   if grep "cc1: Invalid option \`abi=32'" conftest.out >/dev/null; then
        !           706:     result=yes
        !           707:   else
        !           708:     result=no
        !           709:   fi
        !           710: fi
        !           711: rm -f conftest.*
        !           712: AC_MSG_RESULT($result)
        !           713: if test $result = yes; then
        !           714:   ifelse([$2],,:,[$2])
1.1       maekawa   715: else
1.1.1.3 ! ohara     716:   ifelse([$3],,:,[$3])
1.1       maekawa   717: fi
1.1.1.3 ! ohara     718: ])
1.1       maekawa   719:
1.1.1.3 ! ohara     720:
        !           721: dnl  GMP_GCC_NO_CPP_PRECOMP(CCBASE,CC,CFLAGS,[ACTIONS-YES][,ACTIONS-NO])
        !           722: dnl  -------------------------------------------------------------------
        !           723: dnl  Check whether -no-cpp-precomp should be used on this compiler, and
        !           724: dnl  execute the corresponding ACTIONS-YES or ACTIONS-NO.
        !           725: dnl
        !           726: dnl  -no-cpp-precomp is only meant for Apple's hacked version of gcc found
        !           727: dnl  on powerpc*-*-darwin*, but we can give it a try on any gcc.  Normal gcc
        !           728: dnl  (as of 3.0 at least) only gives a warning, not an actual error, and we
        !           729: dnl  watch for that and decide against the option in that case, to avoid
        !           730: dnl  confusing the user.
        !           731:
        !           732: AC_DEFUN(GMP_GCC_NO_CPP_PRECOMP,
        !           733: [if test "$ccbase" = gcc; then
        !           734:   AC_MSG_CHECKING([compiler $2 $3 -no-cpp-precomp])
        !           735:   result=no
        !           736:   cat >conftest.c <<EOF
        !           737: int main () { return 0; }
        !           738: EOF
        !           739:   gmp_compile="$2 $3 -no-cpp-precomp conftest.c >conftest.out 2>&1"
        !           740:   if AC_TRY_EVAL(gmp_compile); then
        !           741:     if grep "unrecognized option.*-no-cpp-precomp" conftest.out >/dev/null; then : ;
        !           742:     else
        !           743:       result=yes
        !           744:     fi
        !           745:   fi
        !           746:   cat conftest.out >&AC_FD_CC
        !           747:   rm -f conftest* a.out
        !           748:   AC_MSG_RESULT($result)
        !           749:   if test "$result" = yes; then
        !           750:       ifelse([$4],,:,[$4])
        !           751:   else
        !           752:       ifelse([$5],,:,[$5])
1.1       maekawa   753:   fi
                    754: fi
1.1.1.3 ! ohara     755: ])
1.1       maekawa   756:
                    757:
1.1.1.3 ! ohara     758: dnl  GMP_GCC_WA_MCPU(CC+CFLAGS, NEWFLAG [,ACTION-YES [,ACTION-NO]])
        !           759: dnl  --------------------------------------------------------------
        !           760: dnl  Check whether gcc (or gas rather) accepts a flag like "-Wa,-mev67".
        !           761: dnl
        !           762: dnl  Gas doesn't give an error for an unknown cpu, it only prints a warning
        !           763: dnl  like "Warning: Unknown CPU identifier `ev78'".
        !           764: dnl
        !           765: dnl  This is intended for use on alpha, since only recent versions of gas
        !           766: dnl  accept -mev67, but there's nothing here that's alpha specific.
        !           767:
        !           768: AC_DEFUN(GMP_GCC_WA_MCPU,
        !           769: [AC_MSG_CHECKING([assembler $1 $2])
        !           770: result=no
        !           771: cat >conftest.c <<EOF
        !           772: int main () {}
        !           773: EOF
        !           774: gmp_compile="$1 $2 -c conftest.c >conftest.out 2>&1"
        !           775: if AC_TRY_EVAL(gmp_compile); then
        !           776:   if grep "Unknown CPU identifier" conftest.out >/dev/null; then : ;
        !           777:   else
        !           778:     result=yes
        !           779:   fi
        !           780: fi
        !           781: cat conftest.out >&AC_FD_CC
        !           782: rm -f conftest*
        !           783: AC_MSG_RESULT($result)
        !           784: if test "$result" = yes; then
        !           785:   ifelse([$3],,:,[$3])
        !           786: else
        !           787:   ifelse([$4],,:,[$4])
        !           788: fi
        !           789: ])
        !           790:
        !           791:
        !           792: dnl  GMP_PROG_CXX_WORKS(cxx/cxxflags [, ACTION-YES [,ACTION-NO]])
        !           793: dnl  ------------------------------------------------------------
        !           794: dnl  Check whether cxx/cxxflags can compile and link.
        !           795: dnl
        !           796: dnl  This test is designed to be run repeatedly with different cxx/cxxflags
        !           797: dnl  selections, so the result is not cached.
        !           798:
        !           799: AC_DEFUN(GMP_PROG_CXX_WORKS,
        !           800: [AC_MSG_CHECKING([C++ compiler $1])
        !           801: cat >conftest.cc <<EOF
        !           802: #include <iostream>
        !           803: using namespace std;
        !           804: int
        !           805: main (void)
        !           806: {
        !           807:   cout.setf (ios::hex);
        !           808:   cout << 123;
        !           809:   return 0;
        !           810: }
        !           811: EOF
        !           812:
        !           813: gmp_cxxcompile="$1 conftest.cc -o conftest >&AC_FD_CC"
        !           814: if AC_TRY_EVAL(gmp_cxxcompile); then
        !           815:   rm -f conftest*
        !           816:   AC_MSG_RESULT(yes)
        !           817:   ifelse([$2],,:,[$2])
        !           818: else
        !           819:   rm -f conftest*
        !           820:   AC_MSG_RESULT(no)
        !           821:   ifelse([$3],,:,[$3])
        !           822: fi
        !           823: ])
1.1       maekawa   824:
                    825:
                    826: dnl  GMP_INIT([M4-DEF-FILE])
1.1.1.3 ! ohara     827: dnl  -----------------------
        !           828: dnl  Initializations for GMP config.m4 generation.
        !           829: dnl
        !           830: dnl  FIXME: The generated config.m4 doesn't get recreated by config.status.
        !           831: dnl  Maybe the relevant "echo"s should go through AC_CONFIG_COMMANDS.
        !           832:
1.1       maekawa   833: AC_DEFUN(GMP_INIT,
                    834: [ifelse([$1], , gmp_configm4=config.m4, gmp_configm4="[$1]")
                    835: gmp_tmpconfigm4=cnfm4.tmp
                    836: gmp_tmpconfigm4i=cnfm4i.tmp
                    837: gmp_tmpconfigm4p=cnfm4p.tmp
1.1.1.3 ! ohara     838: rm -f $gmp_tmpconfigm4 $gmp_tmpconfigm4i $gmp_tmpconfigm4p
        !           839:
        !           840: # CONFIG_TOP_SRCDIR is a path from the mpn builddir to the top srcdir.
        !           841: # The pattern here tests for an absolute path the same way as
        !           842: # _AC_OUTPUT_FILES in autoconf acgeneral.m4.
        !           843: case $srcdir in
        !           844: [[\\/]]* | ?:[[\\/]]* )  tmp="$srcdir"    ;;
        !           845: *)                       tmp="../$srcdir" ;;
        !           846: esac
        !           847: echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
        !           848:
        !           849: # All CPUs use asm-defs.m4
        !           850: echo ["include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
        !           851: ])
        !           852:
1.1       maekawa   853:
                    854: dnl  GMP_FINISH
                    855: dnl  ----------
                    856: dnl  Create config.m4 from its accumulated parts.
                    857: dnl
                    858: dnl  __CONFIG_M4_INCLUDED__ is used so that a second or subsequent include
                    859: dnl  of config.m4 is harmless.
                    860: dnl
                    861: dnl  A separate ifdef on the angle bracket quoted part ensures the quoting
                    862: dnl  style there is respected.  The basic defines from gmp_tmpconfigm4 are
                    863: dnl  fully quoted but are still put under an ifdef in case any have been
                    864: dnl  redefined by one of the m4 include files.
                    865: dnl
                    866: dnl  Doing a big ifdef within asm-defs.m4 and/or other macro files wouldn't
                    867: dnl  work, since it'd interpret parentheses and quotes in dnl comments, and
                    868: dnl  having a whole file as a macro argument would overflow the string space
                    869: dnl  on BSD m4.
                    870:
                    871: AC_DEFUN(GMP_FINISH,
                    872: [AC_REQUIRE([GMP_INIT])
                    873: echo "creating $gmp_configm4"
1.1.1.3 ! ohara     874: echo ["d""nl $gmp_configm4.  Generated automatically by configure."] > $gmp_configm4
1.1       maekawa   875: if test -f $gmp_tmpconfigm4; then
1.1.1.3 ! ohara     876:   echo ["changequote(<,>)"] >> $gmp_configm4
1.1       maekawa   877:   echo ["ifdef(<__CONFIG_M4_INCLUDED__>,,<"] >> $gmp_configm4
                    878:   cat $gmp_tmpconfigm4 >> $gmp_configm4
                    879:   echo [">)"] >> $gmp_configm4
1.1.1.3 ! ohara     880:   echo ["changequote(\`,')"] >> $gmp_configm4
1.1       maekawa   881:   rm $gmp_tmpconfigm4
                    882: fi
                    883: echo ["ifdef(\`__CONFIG_M4_INCLUDED__',,\`"] >> $gmp_configm4
                    884: if test -f $gmp_tmpconfigm4i; then
                    885:   cat $gmp_tmpconfigm4i >> $gmp_configm4
                    886:   rm $gmp_tmpconfigm4i
                    887: fi
                    888: if test -f $gmp_tmpconfigm4p; then
                    889:   cat $gmp_tmpconfigm4p >> $gmp_configm4
                    890:   rm $gmp_tmpconfigm4p
                    891: fi
                    892: echo ["')"] >> $gmp_configm4
                    893: echo ["define(\`__CONFIG_M4_INCLUDED__')"] >> $gmp_configm4
1.1.1.3 ! ohara     894: ])
1.1       maekawa   895:
                    896:
1.1.1.3 ! ohara     897: dnl  GMP_INCLUDE_MPN(FILE)
        !           898: dnl  ---------------------
        !           899: dnl  Add an include_mpn(`FILE') to config.m4.  FILE should be a path
        !           900: dnl  relative to the mpn source directory, for example
        !           901: dnl
        !           902: dnl      GMP_INCLUDE_MPN(`x86/x86-defs.m4')
        !           903: dnl
        !           904:
        !           905: AC_DEFUN(GMP_INCLUDE_MPN,
1.1       maekawa   906: [AC_REQUIRE([GMP_INIT])
1.1.1.3 ! ohara     907: echo ["include_mpn(\`$1')"] >> $gmp_tmpconfigm4i
        !           908: ])
        !           909:
        !           910:
        !           911: dnl  GMP_DEFINE(MACRO, DEFINITION [, LOCATION])
        !           912: dnl  ------------------------------------------
        !           913: dnl  Define M4 macro MACRO as DEFINITION in temporary file.
        !           914: dnl
        !           915: dnl  If LOCATION is `POST', the definition will appear after any include()
        !           916: dnl  directives inserted by GMP_INCLUDE.  Mind the quoting!  No shell
        !           917: dnl  variables will get expanded.  Don't forget to invoke GMP_FINISH to
        !           918: dnl  create file config.m4.  config.m4 uses `<' and '>' as quote characters
        !           919: dnl  for all defines.
1.1       maekawa   920:
                    921: AC_DEFUN(GMP_DEFINE,
                    922: [AC_REQUIRE([GMP_INIT])
1.1.1.3 ! ohara     923: echo ['define(<$1>, <$2>)'] >>ifelse([$3], [POST],
        !           924:                               $gmp_tmpconfigm4p, $gmp_tmpconfigm4)
        !           925: ])
        !           926:
        !           927:
        !           928: dnl  GMP_DEFINE_RAW(STRING, [, LOCATION])
        !           929: dnl  ------------------------------------
        !           930: dnl  Put STRING into config.m4 file.
        !           931: dnl
        !           932: dnl  If LOCATION is `POST', the definition will appear after any include()
        !           933: dnl  directives inserted by GMP_INCLUDE.  Don't forget to invoke GMP_FINISH
        !           934: dnl  to create file config.m4.
1.1       maekawa   935:
                    936: AC_DEFUN(GMP_DEFINE_RAW,
                    937: [AC_REQUIRE([GMP_INIT])
                    938: echo [$1] >> ifelse([$2], [POST], $gmp_tmpconfigm4p, $gmp_tmpconfigm4)
                    939: ])
                    940:
1.1.1.3 ! ohara     941:
        !           942: dnl  GMP_TRY_ASSEMBLE(asm-code,[action-success][,action-fail])
        !           943: dnl  ----------------------------------------------------------
        !           944: dnl  Attempt to assemble the given code.
        !           945: dnl  Do "action-success" if this succeeds, "action-fail" if not.
        !           946: dnl
        !           947: dnl  conftest.o and conftest.out are available for inspection in
        !           948: dnl  "action-success".  If either action does a "break" out of a loop then
        !           949: dnl  an explicit "rm -f conftest*" will be necessary.
        !           950: dnl
        !           951: dnl  This is not unlike AC_TRY_COMPILE, but there's no default includes or
        !           952: dnl  anything in "asm-code", everything wanted must be given explicitly.
        !           953:
        !           954: AC_DEFUN(GMP_TRY_ASSEMBLE,
        !           955: [cat >conftest.s <<EOF
        !           956: [$1]
1.1       maekawa   957: EOF
1.1.1.3 ! ohara     958: gmp_assemble="$CCAS $CFLAGS conftest.s >conftest.out 2>&1"
        !           959: if AC_TRY_EVAL(gmp_assemble); then
        !           960:   cat conftest.out >&AC_FD_CC
        !           961:   ifelse([$2],,:,[$2])
1.1       maekawa   962: else
1.1.1.3 ! ohara     963:   cat conftest.out >&AC_FD_CC
1.1       maekawa   964:   echo "configure: failed program was:" >&AC_FD_CC
1.1.1.3 ! ohara     965:   cat conftest.s >&AC_FD_CC
        !           966:   ifelse([$3],,:,[$3])
1.1       maekawa   967: fi
                    968: rm -f conftest*
                    969: ])
                    970:
1.1.1.3 ! ohara     971:
        !           972: dnl  GMP_ASM_LABEL_SUFFIX
        !           973: dnl  --------------------
        !           974: dnl  Should a label have a colon or not?
        !           975:
        !           976: AC_DEFUN(GMP_ASM_LABEL_SUFFIX,
        !           977: [AC_CACHE_CHECK([what assembly label suffix to use],
        !           978:                 gmp_cv_asm_label_suffix,
        !           979: [case $host in
        !           980:   # Empty is only for the HP-UX hppa assembler; hppa gas requires a colon.
        !           981:   *-*-hpux*) gmp_cv_asm_label_suffix=  ;;
        !           982:   *)         gmp_cv_asm_label_suffix=: ;;
        !           983: esac
        !           984: ])
        !           985: echo ["define(<LABEL_SUFFIX>, <\$][1$gmp_cv_asm_label_suffix>)"] >> $gmp_tmpconfigm4
        !           986: ])
        !           987:
        !           988:
        !           989: dnl  GMP_ASM_UNDERSCORE
        !           990: dnl  ------------------
        !           991: dnl  Determine whether global symbols need to be prefixed with an underscore.
        !           992: dnl  A test program is linked to an assembler module with or without an
        !           993: dnl  underscore to see which works.
        !           994: dnl
        !           995: dnl  This method should be more reliable than grepping a .o file or using
        !           996: dnl  nm, since it corresponds to what a real program is going to do.  Note
        !           997: dnl  in particular that grepping doesn't work with SunOS 4 native grep since
        !           998: dnl  that grep seems to have trouble with '\0's in files.
        !           999:
        !          1000: AC_DEFUN(GMP_ASM_UNDERSCORE,
        !          1001: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1002: AC_REQUIRE([GMP_ASM_GLOBL])
        !          1003: AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
        !          1004: AC_CACHE_CHECK([if globals are prefixed by underscore],
        !          1005:                gmp_cv_asm_underscore,
        !          1006: [cat >conftes1.c <<EOF
        !          1007: #ifdef __cplusplus
        !          1008: extern "C" { void underscore_test(); }
        !          1009: #endif
        !          1010: main () { underscore_test(); }
        !          1011: EOF
        !          1012: for tmp_underscore in "" "_"; do
        !          1013:   cat >conftes2.s <<EOF
        !          1014:        $gmp_cv_asm_text
        !          1015:        $gmp_cv_asm_globl ${tmp_underscore}underscore_test
        !          1016: ${tmp_underscore}underscore_test$gmp_cv_asm_label_suffix
        !          1017: EOF
        !          1018:   case $host in
        !          1019:   *-*-aix*)
        !          1020:     cat >>conftes2.s <<EOF
        !          1021:        $gmp_cv_asm_globl .${tmp_underscore}underscore_test
        !          1022: .${tmp_underscore}underscore_test$gmp_cv_asm_label_suffix
        !          1023: EOF
        !          1024:     ;;
        !          1025:   esac
        !          1026:   gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftes1.c >&AC_FD_CC && $CCAS $CFLAGS conftes2.s >&AC_FD_CC && $CC $CFLAGS conftes1.$OBJEXT conftes2.$OBJEXT >&AC_FD_CC"
        !          1027:   if AC_TRY_EVAL(gmp_compile); then
        !          1028:     eval tmp_result$tmp_underscore=yes
        !          1029:   else
        !          1030:     eval tmp_result$tmp_underscore=no
        !          1031:   fi
        !          1032: done
        !          1033:
        !          1034: if test $tmp_result_ = yes; then
        !          1035:   if test $tmp_result = yes; then
        !          1036:     AC_MSG_ERROR([Test program unexpectedly links both with and without underscore.])
        !          1037:   else
        !          1038:     gmp_cv_asm_underscore=yes
        !          1039:   fi
        !          1040: else
        !          1041:   if test $tmp_result = yes; then
        !          1042:     gmp_cv_asm_underscore=no
        !          1043:   else
        !          1044:     AC_MSG_ERROR([Test program links neither with nor without underscore.])
        !          1045:   fi
        !          1046: fi
        !          1047: rm -f conftes1* conftes2* a.out
        !          1048: ])
        !          1049: if test "$gmp_cv_asm_underscore" = "yes"; then
        !          1050:   GMP_DEFINE(GSYM_PREFIX, [_])
        !          1051: else
        !          1052:   GMP_DEFINE(GSYM_PREFIX, [])
        !          1053: fi
        !          1054: ])
        !          1055:
        !          1056:
        !          1057: dnl  GMP_ASM_ALIGN_LOG
        !          1058: dnl  -----------------
1.1       maekawa  1059: dnl  Is parameter to `.align' logarithmic?
1.1.1.3 ! ohara    1060:
        !          1061: AC_DEFUN(GMP_ASM_ALIGN_LOG,
        !          1062: [AC_REQUIRE([GMP_ASM_GLOBL])
        !          1063: AC_REQUIRE([GMP_ASM_DATA])
        !          1064: AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
        !          1065: AC_REQUIRE([GMP_PROG_NM])
1.1       maekawa  1066: AC_CACHE_CHECK([if .align assembly directive is logarithmic],
1.1.1.3 ! ohara    1067:                gmp_cv_asm_align_log,
        !          1068: [GMP_TRY_ASSEMBLE(
        !          1069: [              $gmp_cv_asm_data
1.1       maekawa  1070:        .align  4
1.1.1.3 ! ohara    1071:        $gmp_cv_asm_globl       foo
1.1       maekawa  1072:        .byte   1
                   1073:        .align  4
1.1.1.3 ! ohara    1074: foo$gmp_cv_asm_label_suffix
        !          1075:        .byte   2],
        !          1076:   [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \
        !          1077:      sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`]
1.1       maekawa  1078:   if test "$gmp_tmp_val" = "10" || test "$gmp_tmp_val" = "16"; then
1.1.1.3 ! ohara    1079:     gmp_cv_asm_align_log=yes
1.1       maekawa  1080:   else
1.1.1.3 ! ohara    1081:     gmp_cv_asm_align_log=no
        !          1082:   fi],
        !          1083:   [AC_MSG_ERROR([cannot assemble alignment test])])])
        !          1084:
        !          1085: GMP_DEFINE_RAW(["define(<ALIGN_LOGARITHMIC>,<$gmp_cv_asm_align_log>)"])
1.1       maekawa  1086: ])
                   1087:
                   1088:
1.1.1.3 ! ohara    1089: dnl  GMP_ASM_ALIGN_FILL_0x90
        !          1090: dnl  -----------------------
1.1       maekawa  1091: dnl  Determine whether a ",0x90" suffix works on a .align directive.
1.1.1.3 ! ohara    1092: dnl  This is only meant for use on x86, 0x90 being a "nop".
        !          1093: dnl
        !          1094: dnl  Old gas, eg. 1.92.3
        !          1095: dnl       Needs ",0x90" or else the fill is 0x00, which can't be executed
        !          1096: dnl       across.
        !          1097: dnl
        !          1098: dnl  New gas, eg. 2.91
        !          1099: dnl       Generates multi-byte nop fills even when ",0x90" is given.
1.1       maekawa  1100: dnl
1.1.1.3 ! ohara    1101: dnl  Solaris 2.6 as
        !          1102: dnl       ",0x90" is not allowed, causes a fatal error.
        !          1103: dnl
        !          1104: dnl  Solaris 2.8 as
        !          1105: dnl       ",0x90" does nothing, generates a warning that it's being ignored.
        !          1106: dnl
        !          1107: dnl  SCO OpenServer 5 as
        !          1108: dnl       Second parameter is max bytes to fill, not a fill pattern.
        !          1109: dnl       ",0x90" is an error due to being bigger than the first parameter.
        !          1110: dnl       Multi-byte nop fills are generated in text segments.
1.1       maekawa  1111: dnl
                   1112: dnl  Note that both solaris "as"s only care about ",0x90" if they actually
1.1.1.3 ! ohara    1113: dnl  have to use it to fill something, hence the .byte in the test.  It's
        !          1114: dnl  the second .align which provokes the error or warning.
1.1       maekawa  1115: dnl
1.1.1.3 ! ohara    1116: dnl  The warning from solaris 2.8 is supressed to stop anyone worrying that
        !          1117: dnl  something might be wrong.
1.1       maekawa  1118:
1.1.1.3 ! ohara    1119: AC_DEFUN(GMP_ASM_ALIGN_FILL_0x90,
        !          1120: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1121: AC_CACHE_CHECK([if the .align directive accepts an 0x90 fill in .text],
        !          1122:                gmp_cv_asm_align_fill_0x90,
        !          1123: [GMP_TRY_ASSEMBLE(
        !          1124: [              $gmp_cv_asm_text
1.1       maekawa  1125:        .align  4, 0x90
                   1126:        .byte   0
1.1.1.3 ! ohara    1127:        .align  4, 0x90],
        !          1128: [if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then
        !          1129:   echo "Supressing this warning by omitting 0x90" 1>&AC_FD_CC
        !          1130:   gmp_cv_asm_align_fill_0x90=no
1.1       maekawa  1131: else
1.1.1.3 ! ohara    1132:   gmp_cv_asm_align_fill_0x90=yes
        !          1133: fi],
        !          1134: [gmp_cv_asm_align_fill_0x90=no])])
        !          1135:
        !          1136: GMP_DEFINE_RAW(["define(<ALIGN_FILL_0x90>,<$gmp_cv_asm_align_fill_0x90>)"])
1.1       maekawa  1137: ])
                   1138:
                   1139:
1.1.1.3 ! ohara    1140: dnl  GMP_ASM_TEXT
        !          1141: dnl  ------------
        !          1142:
        !          1143: AC_DEFUN(GMP_ASM_TEXT,
        !          1144: [AC_CACHE_CHECK([how to switch to text section],
        !          1145:                 gmp_cv_asm_text,
        !          1146: [case $host in
        !          1147:   *-*-aix*)  gmp_cv_asm_text=[".csect .text[PR]"] ;;
        !          1148:   *-*-hpux*) gmp_cv_asm_text=".code" ;;
        !          1149:   *)         gmp_cv_asm_text=".text" ;;
1.1       maekawa  1150: esac
                   1151: ])
1.1.1.3 ! ohara    1152: echo ["define(<TEXT>, <$gmp_cv_asm_text>)"] >> $gmp_tmpconfigm4
        !          1153: ])
1.1       maekawa  1154:
1.1.1.3 ! ohara    1155:
        !          1156: dnl  GMP_ASM_DATA
        !          1157: dnl  ------------
1.1       maekawa  1158: dnl  Can we say `.data'?
1.1.1.3 ! ohara    1159:
        !          1160: AC_DEFUN(GMP_ASM_DATA,
        !          1161: [AC_CACHE_CHECK([how to switch to data section],
        !          1162:                 gmp_cv_asm_data,
        !          1163: [case $host in
        !          1164:   *-*-aix*) gmp_cv_asm_data=[".csect .data[RW]"] ;;
        !          1165:   *)        gmp_cv_asm_data=".data" ;;
1.1       maekawa  1166: esac
                   1167: ])
1.1.1.3 ! ohara    1168: echo ["define(<DATA>, <$gmp_cv_asm_data>)"] >> $gmp_tmpconfigm4
        !          1169: ])
        !          1170:
        !          1171:
        !          1172: dnl  GMP_ASM_RODATA
        !          1173: dnl  --------------
        !          1174: dnl  Find out how to switch to the read-only data section.
        !          1175: dnl
        !          1176: dnl  The compiler output is grepped for the right directive.  It's not
        !          1177: dnl  considered wise to just probe for ".section .rodata" or whatever works,
        !          1178: dnl  since arbitrary section names might be accepted, but not necessarily do
        !          1179: dnl  the right thing when they get to the linker.
        !          1180: dnl
        !          1181: dnl  Only a few asm files use RODATA, so this code is perhaps a bit
        !          1182: dnl  excessive right now, but should find more uses in the future.
        !          1183: dnl
        !          1184: dnl  FIXME: gcc on aix generates something like ".csect _foo.ro_c[RO],3"
        !          1185: dnl  where foo is the object file.  Might need to check for that if we use
        !          1186: dnl  RODATA there.
        !          1187:
        !          1188: AC_DEFUN(GMP_ASM_RODATA,
        !          1189: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1190: AC_REQUIRE([GMP_ASM_DATA])
        !          1191: AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
        !          1192: AC_REQUIRE([GMP_ASM_UNDERSCORE])
        !          1193: AC_CACHE_CHECK([how to switch to read-only data section],
        !          1194:                gmp_cv_asm_rodata,
        !          1195: [
        !          1196: dnl Default to DATA on CPUs with split code/data caching, and TEXT
        !          1197: dnl elsewhere.  i386 means generic x86, so use DATA on it.
        !          1198: case $host in
        !          1199: X86_PATTERN) gmp_cv_asm_rodata="$gmp_cv_asm_data" ;;
        !          1200: *)           gmp_cv_asm_rodata="$gmp_cv_asm_text" ;;
        !          1201: esac
        !          1202:
        !          1203: cat >conftest.c <<EOF
        !          1204: const int foo = 123;
        !          1205: EOF
        !          1206: echo "Test program:" >&AC_FD_CC
        !          1207: cat conftest.c >&AC_FD_CC
        !          1208: gmp_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c >&AC_FD_CC"
        !          1209: if AC_TRY_EVAL(gmp_compile); then
        !          1210:   echo "Compiler output:" >&AC_FD_CC
        !          1211:   cat conftest.s >&AC_FD_CC
        !          1212:   if test $gmp_cv_asm_underscore = yes; then
        !          1213:     tmp_gsym_prefix=_
        !          1214:   else
        !          1215:     tmp_gsym_prefix=
        !          1216:   fi
        !          1217:   # must see our label
        !          1218:   if grep "^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" conftest.s >/dev/null 2>&AC_FD_CC; then
        !          1219:     # take the last directive before our label (hence skipping segments
        !          1220:     # getting debugging info etc)
        !          1221:     tmp_match=`sed -n ["/^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix/q
        !          1222:                         /^[.   ]*data/p
        !          1223:                         /^[.   ]*rdata/p
        !          1224:                         /^[.   ]*text/p
        !          1225:                         /^[.   ]*section/p
        !          1226:                         /^[.   ]*csect/p
        !          1227:                         /^[.   ]*CSECT/p"] conftest.s | sed -n '$p'`
        !          1228:     echo "Match: $tmp_match" >&AC_FD_CC
        !          1229:     if test -n "$tmp_match"; then
        !          1230:       gmp_cv_asm_rodata=$tmp_match
        !          1231:     fi
        !          1232:   else
        !          1233:     echo "Couldn't find label: ^${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix" >&AC_FD_CC
        !          1234:   fi
        !          1235: fi
        !          1236: ])
        !          1237: echo ["define(<RODATA>, <$gmp_cv_asm_rodata>)"] >> $gmp_tmpconfigm4
        !          1238: ])
        !          1239:
1.1       maekawa  1240:
1.1.1.3 ! ohara    1241: dnl  GMP_ASM_GLOBL
        !          1242: dnl  -------------
1.1       maekawa  1243: dnl  Can we say `.global'?
1.1.1.3 ! ohara    1244:
        !          1245: AC_DEFUN(GMP_ASM_GLOBL,
        !          1246: [AC_CACHE_CHECK([how to export a symbol],
        !          1247:                 gmp_cv_asm_globl,
        !          1248: [case $host in
        !          1249:   *-*-hpux*) gmp_cv_asm_globl=".export" ;;
        !          1250:   *)         gmp_cv_asm_globl=".globl" ;;
1.1       maekawa  1251: esac
                   1252: ])
1.1.1.3 ! ohara    1253: echo ["define(<GLOBL>, <$gmp_cv_asm_globl>)"] >> $gmp_tmpconfigm4
        !          1254: ])
        !          1255:
        !          1256:
        !          1257: dnl  GMP_ASM_GLOBL_ATTR
        !          1258: dnl  ------------------
        !          1259: dnl  Do we need something after `.global symbol'?
        !          1260:
        !          1261: AC_DEFUN(GMP_ASM_GLOBL_ATTR,
        !          1262: [AC_CACHE_CHECK([if the export directive needs an attribute],
        !          1263:                 gmp_cv_asm_globl_attr,
        !          1264: [case $host in
        !          1265:   *-*-hpux*) gmp_cv_asm_globl_attr=",entry" ;;
        !          1266:   *)         gmp_cv_asm_globl_attr="" ;;
        !          1267: esac
        !          1268: ])
        !          1269: echo ["define(<GLOBL_ATTR>, <$gmp_cv_asm_globl_attr>)"] >> $gmp_tmpconfigm4
        !          1270: ])
1.1       maekawa  1271:
1.1.1.3 ! ohara    1272:
        !          1273: dnl  GMP_ASM_TYPE
        !          1274: dnl  ------------
        !          1275: dnl  Can we say ".type", and how?
        !          1276: dnl
        !          1277: dnl  For i386 GNU/Linux ELF systems, and very likely other ELF systems,
        !          1278: dnl  .type and .size are important on functions in shared libraries.  If
        !          1279: dnl  .type is omitted and the mainline program references that function then
        !          1280: dnl  the code will be copied down to the mainline at load time like a piece
        !          1281: dnl  of data.  If .size is wrong or missing (it defaults to 4 bytes or some
        !          1282: dnl  such) then incorrect bytes will be copied and a segv is the most likely
        !          1283: dnl  result.  In any case such copying is not what's wanted, a .type
        !          1284: dnl  directive will ensure a PLT entry is used.
        !          1285: dnl
        !          1286: dnl  In GMP the assembler functions are normally only used from within the
        !          1287: dnl  library (since most programs are not interested in the low level
        !          1288: dnl  routines), and in those circumstances a missing .type isn't fatal,
        !          1289: dnl  letting the problem go unnoticed.  tests/mpn/t-asmtype.c aims to check
        !          1290: dnl  for it.
        !          1291:
        !          1292: AC_DEFUN(GMP_ASM_TYPE,
        !          1293: [AC_CACHE_CHECK([for assembler .type directive],
        !          1294:                 gmp_cv_asm_type,
        !          1295: [gmp_cv_asm_type=
1.1       maekawa  1296: for gmp_tmp_prefix in @ \# %; do
1.1.1.3 ! ohara    1297:   GMP_TRY_ASSEMBLE([   .type   sym,${gmp_tmp_prefix}function],
        !          1298:     [if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ;
        !          1299:     else
        !          1300:       gmp_cv_asm_type=".type   \$][1,${gmp_tmp_prefix}\$][2"
        !          1301:       break
        !          1302:     fi])
1.1       maekawa  1303: done
1.1.1.3 ! ohara    1304: rm -f conftest*
1.1       maekawa  1305: ])
1.1.1.3 ! ohara    1306: echo ["define(<TYPE>, <$gmp_cv_asm_type>)"] >> $gmp_tmpconfigm4
        !          1307: ])
        !          1308:
1.1       maekawa  1309:
1.1.1.3 ! ohara    1310: dnl  GMP_ASM_SIZE
        !          1311: dnl  ------------
1.1       maekawa  1312: dnl  Can we say `.size'?
1.1.1.3 ! ohara    1313:
        !          1314: AC_DEFUN(GMP_ASM_SIZE,
        !          1315: [AC_CACHE_CHECK([for assembler .size directive],
        !          1316:                 gmp_cv_asm_size,
        !          1317: [gmp_cv_asm_size=
        !          1318: GMP_TRY_ASSEMBLE([     .size   sym,1],
        !          1319:   [if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ;
        !          1320:   else
        !          1321:     gmp_cv_asm_size=".size     \$][1,\$][2"
        !          1322:   fi])
        !          1323: ])
        !          1324: echo ["define(<SIZE>, <$gmp_cv_asm_size>)"] >> $gmp_tmpconfigm4
1.1       maekawa  1325: ])
                   1326:
1.1.1.3 ! ohara    1327:
        !          1328: dnl  GMP_ASM_LSYM_PREFIX
        !          1329: dnl  -------------------
1.1       maekawa  1330: dnl  What is the prefix for a local label?
1.1.1.3 ! ohara    1331: dnl
        !          1332: dnl  The prefixes tested are,
        !          1333: dnl
        !          1334: dnl      L  - usual for underscore systems
        !          1335: dnl      .L - usual for non-underscore systems
        !          1336: dnl      $  - alpha (gas and OSF system assembler)
        !          1337: dnl      L$ - hppa (gas and HP-UX system assembler)
        !          1338: dnl
        !          1339: dnl  The default is "L" if the tests fail for any reason.  There's a good
        !          1340: dnl  chance this will be adequate, since on most systems labels are local
        !          1341: dnl  anyway unless given a ".globl", and an "L" will avoid clashes with
        !          1342: dnl  other identifers.
        !          1343: dnl
        !          1344: dnl  For gas, ".L" is normally purely local to the assembler, it doesn't get
        !          1345: dnl  put into the object file at all.  This style is preferred, to keep the
        !          1346: dnl  object files nice and clean.
        !          1347: dnl
        !          1348: dnl  BSD format nm produces a line like the following.  The lower case "t"
        !          1349: dnl  indicates a local text segment label.  On OSF with "nm -B", an "N" is
        !          1350: dnl  printed instead.
        !          1351: dnl
        !          1352: dnl      00000000 t Lgurkmacka
        !          1353: dnl
        !          1354: dnl  HP-UX nm prints an error message (though seems to give a 0 exit) if
        !          1355: dnl  there's no symbols at all in an object file, hence the use of "dummy".
        !          1356:
        !          1357: AC_DEFUN(GMP_ASM_LSYM_PREFIX,
        !          1358: [AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
        !          1359: AC_REQUIRE([GMP_PROG_NM])
1.1       maekawa  1360: AC_CACHE_CHECK([what prefix to use for a local label],
1.1.1.3 ! ohara    1361:                gmp_cv_asm_lsym_prefix,
        !          1362: [for gmp_tmp_pre in L .L $ L$; do
        !          1363:   echo "Trying $gmp_tmp_pre" >&AC_FD_CC
        !          1364:   GMP_TRY_ASSEMBLE(
        !          1365: [dummy${gmp_cv_asm_label_suffix}
        !          1366: ${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix}],
        !          1367:   [if $NM conftest.$OBJEXT >conftest.nm 2>&AC_FD_CC; then : ; else
        !          1368:     cat conftest.nm >&AC_FD_CC
        !          1369:     AC_MSG_WARN(["$NM" failure])
        !          1370:     break
        !          1371:   fi
        !          1372:   cat conftest.nm >&AC_FD_CC
        !          1373:   if grep gurkmacka conftest.nm >/dev/null; then : ; else
        !          1374:     # no mention of the symbol, this is good
        !          1375:     gmp_cv_asm_lsym_prefix="$gmp_tmp_pre"
        !          1376:     break
        !          1377:   fi
        !          1378:   if grep [' [Nt] .*gurkmacka'] conftest.nm >/dev/null; then
        !          1379:     # symbol mentioned as a local, use this if nothing better
        !          1380:     if test -z "$gmp_cv_asm_lsym_prefix"; then
        !          1381:       gmp_cv_asm_lsym_prefix="$gmp_tmp_pre"
1.1       maekawa  1382:     fi
                   1383:   fi
1.1.1.3 ! ohara    1384:   ])
1.1       maekawa  1385: done
                   1386: rm -f conftest*
1.1.1.3 ! ohara    1387: if test -z "$gmp_cv_asm_lsym_prefix"; then
        !          1388:   gmp_cv_asm_lsym_prefix=L
        !          1389:   AC_MSG_WARN([cannot determine local label, using default $gmp_cv_asm_lsym_prefix])
        !          1390: fi
1.1       maekawa  1391: ])
1.1.1.3 ! ohara    1392: echo ["define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)"] >> $gmp_tmpconfigm4
        !          1393: AC_DEFINE_UNQUOTED(LSYM_PREFIX, "$gmp_cv_asm_lsym_prefix",
        !          1394:                    [Assembler local label prefix])
1.1       maekawa  1395: ])
                   1396:
                   1397:
1.1.1.3 ! ohara    1398: dnl  GMP_ASM_W32
        !          1399: dnl  -----------
        !          1400: dnl  How to define a 32-bit word.
        !          1401:
        !          1402: AC_DEFUN(GMP_ASM_W32,
        !          1403: [AC_REQUIRE([GMP_ASM_DATA])
        !          1404: AC_REQUIRE([GMP_ASM_GLOBL])
        !          1405: AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
        !          1406: AC_REQUIRE([GMP_PROG_NM])
        !          1407: AC_CACHE_CHECK([how to define a 32-bit word],
        !          1408:               gmp_cv_asm_w32,
        !          1409: [case $host in
1.1       maekawa  1410:   *-*-hpux*)
1.1.1.3 ! ohara    1411:     # FIXME: HPUX puts first symbol at 0x40000000, breaking our assumption
        !          1412:     # that it's at 0x0.  We'll have to declare another symbol before the
        !          1413:     # .long/.word and look at the distance between the two symbols.  The
        !          1414:     # only problem is that the sed expression(s) barfs (on Solaris, for
        !          1415:     # example) for the symbol with value 0.  For now, HPUX uses .word.
        !          1416:     gmp_cv_asm_w32=".word"
1.1       maekawa  1417:     ;;
                   1418:   *-*-*)
1.1.1.3 ! ohara    1419:     gmp_tmp_val=
1.1       maekawa  1420:     for gmp_tmp_op in .long .word; do
1.1.1.3 ! ohara    1421:       GMP_TRY_ASSEMBLE(
        !          1422: [      $gmp_cv_asm_data
        !          1423:        $gmp_cv_asm_globl       foo
1.1       maekawa  1424:        $gmp_tmp_op     0
1.1.1.3 ! ohara    1425: foo$gmp_cv_asm_label_suffix
        !          1426:        .byte   0],
        !          1427:         [gmp_tmp_val=[`$NM conftest.$OBJEXT | grep foo | \
        !          1428:           sed -e 's;[[][0-9][]]\(.*\);\1;' -e 's;[^1-9]*\([0-9]*\).*;\1;'`]
        !          1429:         if test "$gmp_tmp_val" = 4; then
        !          1430:           gmp_cv_asm_w32="$gmp_tmp_op"
1.1       maekawa  1431:           break
1.1.1.3 ! ohara    1432:         fi])
1.1       maekawa  1433:     done
1.1.1.3 ! ohara    1434:     rm -f conftest*
1.1       maekawa  1435:     ;;
                   1436: esac
1.1.1.3 ! ohara    1437: if test -z "$gmp_cv_asm_w32"; then
        !          1438:   AC_MSG_ERROR([cannot determine how to define a 32-bit word])
1.1       maekawa  1439: fi
                   1440: ])
1.1.1.3 ! ohara    1441: echo ["define(<W32>, <$gmp_cv_asm_w32>)"] >> $gmp_tmpconfigm4
1.1       maekawa  1442: ])
                   1443:
1.1.1.3 ! ohara    1444:
        !          1445: dnl  GMP_ASM_X86_MMX([ACTION-IF-YES][,ACTION-IF-NO])
        !          1446: dnl  -----------------------------------------------
        !          1447: dnl  Determine whether the assembler supports MMX instructions.
        !          1448: dnl
        !          1449: dnl  This macro is wanted before GMP_ASM_TEXT, so ".text" is hard coded
        !          1450: dnl  here.  ".text" is believed to be correct on all x86 systems, certainly
        !          1451: dnl  it's all GMP_ASM_TEXT gives currently.  Actually ".text" probably isn't
        !          1452: dnl  needed at all, at least for just checking instruction syntax.
        !          1453: dnl
        !          1454: dnl  "movq %mm0, %mm1" should assemble to "0f 6f c8", but Solaris 2.6 and
        !          1455: dnl  2.7 wrongly assemble it to "0f 6f c1" (that being the reverse "movq
        !          1456: dnl  %mm1, %mm0").  It seems more trouble than it's worth to work around
        !          1457: dnl  this in the code, so just detect and reject.
        !          1458:
        !          1459: AC_DEFUN(GMP_ASM_X86_MMX,
        !          1460: [AC_CACHE_CHECK([if the assembler knows about MMX instructions],
        !          1461:                gmp_cv_asm_x86_mmx,
        !          1462: [GMP_TRY_ASSEMBLE(
        !          1463: [      .text
        !          1464:        movq    %mm0, %mm1],
        !          1465: [gmp_cv_asm_x86_mmx=yes
        !          1466: case $host in
        !          1467: *-*-solaris*)
        !          1468:   if (dis conftest.$OBJEXT >conftest.out) 2>/dev/null; then
        !          1469:     if grep "0f 6f c1" conftest.out >/dev/null; then
        !          1470:       gmp_cv_asm_x86_mmx=movq-bug
        !          1471:     fi
        !          1472:   else
        !          1473:     AC_MSG_WARN(["dis" not available to check for "as" movq bug])
        !          1474:   fi
        !          1475: esac],
        !          1476: [gmp_cv_asm_x86_mmx=no])])
        !          1477:
        !          1478: case $gmp_cv_asm_x86_mmx in
        !          1479: movq-bug)
        !          1480:   AC_MSG_WARN([+----------------------------------------------------------])
        !          1481:   AC_MSG_WARN([| WARNING WARNING WARNING])
        !          1482:   AC_MSG_WARN([| Host CPU has MMX code, but the assembler])
        !          1483:   AC_MSG_WARN([|     $CCAS $CFLAGS])
        !          1484:   AC_MSG_WARN([| has the Solaris 2.6 and 2.7 bug where register to register])
        !          1485:   AC_MSG_WARN([| movq operands are reversed.])
        !          1486:   AC_MSG_WARN([| Non-MMX replacements will be used.])
        !          1487:   AC_MSG_WARN([| This will be an inferior build.])
        !          1488:   AC_MSG_WARN([+----------------------------------------------------------])
        !          1489:   ;;
        !          1490: no)
1.1       maekawa  1491:   AC_MSG_WARN([+----------------------------------------------------------])
                   1492:   AC_MSG_WARN([| WARNING WARNING WARNING])
1.1.1.3 ! ohara    1493:   AC_MSG_WARN([| Host CPU has MMX code, but it can't be assembled by])
1.1       maekawa  1494:   AC_MSG_WARN([|     $CCAS $CFLAGS])
                   1495:   AC_MSG_WARN([| Non-MMX replacements will be used.])
                   1496:   AC_MSG_WARN([| This will be an inferior build.])
                   1497:   AC_MSG_WARN([+----------------------------------------------------------])
1.1.1.3 ! ohara    1498:   ;;
        !          1499: esac
        !          1500: if test "$gmp_cv_asm_x86_mmx" = yes; then
        !          1501:   ifelse([$1],,:,[$1])
        !          1502: else
        !          1503:   ifelse([$2],,:,[$2])
1.1       maekawa  1504: fi
1.1.1.3 ! ohara    1505: ])
        !          1506:
        !          1507:
        !          1508: dnl  GMP_ASM_X86_SHLDL_CL
        !          1509: dnl  --------------------
1.1       maekawa  1510:
1.1.1.3 ! ohara    1511: AC_DEFUN(GMP_ASM_X86_SHLDL_CL,
        !          1512: [AC_REQUIRE([GMP_ASM_TEXT])
1.1       maekawa  1513: AC_CACHE_CHECK([if the assembler takes cl with shldl],
1.1.1.3 ! ohara    1514:                gmp_cv_asm_x86_shldl_cl,
        !          1515: [GMP_TRY_ASSEMBLE(
        !          1516: [      $gmp_cv_asm_text
        !          1517:        shldl   %cl, %eax, %ebx],
        !          1518:   gmp_cv_asm_x86_shldl_cl=yes,
        !          1519:   gmp_cv_asm_x86_shldl_cl=no)
1.1       maekawa  1520: ])
1.1.1.3 ! ohara    1521: if test "$gmp_cv_asm_x86_shldl_cl" = "yes"; then
        !          1522:   GMP_DEFINE(WANT_SHLDL_CL,1)
1.1       maekawa  1523: else
1.1.1.3 ! ohara    1524:   GMP_DEFINE(WANT_SHLDL_CL,0)
1.1       maekawa  1525: fi
1.1.1.3 ! ohara    1526: ])
1.1       maekawa  1527:
                   1528:
1.1.1.3 ! ohara    1529: dnl  GMP_ASM_X86_SSE2([ACTION-IF-YES][,ACTION-IF-NO])
        !          1530: dnl  ------------------------------------------------
        !          1531: dnl  Determine whether the assembler supports SSE2 instructions.
        !          1532: dnl
        !          1533: dnl  This macro is wanted before GMP_ASM_TEXT, so ".text" is hard coded
        !          1534: dnl  here.  ".text" is believed to be correct on all x86 systems, certainly
        !          1535: dnl  it's all GMP_ASM_TEXT gives currently.  Actually ".text" probably isn't
        !          1536: dnl  needed at all, at least for just checking instruction syntax.
        !          1537:
        !          1538: AC_DEFUN(GMP_ASM_X86_SSE2,
        !          1539: [AC_CACHE_CHECK([if the assembler knows about SSE2 instructions],
        !          1540:                gmp_cv_asm_x86_sse2,
        !          1541: [GMP_TRY_ASSEMBLE(
        !          1542: [      .text
        !          1543:        paddq   %mm0, %mm1],
        !          1544:   [gmp_cv_asm_x86_sse2=yes],
        !          1545:   [gmp_cv_asm_x86_sse2=no])
        !          1546: ])
        !          1547: case $gmp_cv_asm_x86_sse2 in
        !          1548: yes)
        !          1549:   ifelse([$1],,:,[$1])
        !          1550:   ;;
        !          1551: *)
        !          1552:   AC_MSG_WARN([+----------------------------------------------------------])
        !          1553:   AC_MSG_WARN([| WARNING WARNING WARNING])
        !          1554:   AC_MSG_WARN([| Host CPU has SSE2 code, but it can't be assembled by])
        !          1555:   AC_MSG_WARN([|     $CCAS $CFLAGS])
        !          1556:   AC_MSG_WARN([| Non-SSE2 replacements will be used.])
        !          1557:   AC_MSG_WARN([| This will be an inferior build.])
        !          1558:   AC_MSG_WARN([+----------------------------------------------------------])
        !          1559:   ifelse([$2],,:,[$2])
        !          1560:   ;;
        !          1561: esac
        !          1562: ])
        !          1563:
1.1       maekawa  1564:
1.1.1.3 ! ohara    1565: dnl  GMP_ASM_X86_MCOUNT
        !          1566: dnl  ------------------
        !          1567: dnl  Find out how to call mcount for profiling on an x86 system.
        !          1568: dnl
        !          1569: dnl  A dummy function is compiled and the ".s" output examined.  The pattern
        !          1570: dnl  matching might be a bit fragile, but should work at least with gcc on
        !          1571: dnl  sensible systems.  Certainly it's better than hard coding a table of
        !          1572: dnl  conventions.
        !          1573: dnl
        !          1574: dnl  For non-PIC, any ".data" is taken to mean a counter might be passed.
        !          1575: dnl  It's assumed a movl will set it up, and the right register is taken
        !          1576: dnl  from that movl.  Any movl involving %esp is ignored (a frame pointer
        !          1577: dnl  setup normally).
        !          1578: dnl
        !          1579: dnl  For PIC, any ".data" is similarly interpreted, but a GOTOFF identifies
        !          1580: dnl  the line setting up the right register.
        !          1581: dnl
        !          1582: dnl  In both cases a line with "mcount" identifies the call and that line is
        !          1583: dnl  used literally.
        !          1584: dnl
        !          1585: dnl  On some systems (eg. FreeBSD 3.5) gcc emits ".data" but doesn't use it,
        !          1586: dnl  so it's not an error to have .data but then not find a register.
        !          1587: dnl
        !          1588: dnl  Variations in mcount conventions on different x86 systems can be found
        !          1589: dnl  in gcc config/i386.  mcount can have a "_" prefix or be .mcount or
        !          1590: dnl  _mcount_ptr, and for PIC it can be called through a GOT entry, or via
        !          1591: dnl  the PLT.  If a pointer to a counter is required it's passed in %eax or
        !          1592: dnl  %edx.
        !          1593: dnl
        !          1594: dnl  Flags to specify PIC are taken from $lt_prog_compiler_pic set by
        !          1595: dnl  AC_PROG_LIBTOOL.
        !          1596: dnl
        !          1597: dnl  Enhancement: Cache the values determined here. But what's the right way
        !          1598: dnl  to get two variables (mcount_nonpic_reg and mcount_nonpic_call say) set
        !          1599: dnl  from one block of commands?
        !          1600:
        !          1601: AC_DEFUN(GMP_ASM_X86_MCOUNT,
        !          1602: [AC_REQUIRE([AC_ENABLE_SHARED])
        !          1603: AC_REQUIRE([AC_PROG_LIBTOOL])
        !          1604: AC_MSG_CHECKING([how to call x86 mcount])
        !          1605: cat >conftest.c <<EOF
        !          1606: foo(){bar();}
        !          1607: EOF
        !          1608:
        !          1609: if test "$enable_static" = yes; then
        !          1610:   gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS -S conftest.c 1>&AC_FD_CC"
        !          1611:   if AC_TRY_EVAL(gmp_asmout_compile); then
        !          1612:     if grep '\.data' conftest.s >/dev/null; then
        !          1613:       mcount_nonpic_reg=`sed -n ['/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p'] conftest.s`
        !          1614:     else
        !          1615:       mcount_nonpic_reg=
        !          1616:     fi
        !          1617:     mcount_nonpic_call=`grep 'call.*mcount' conftest.s`
        !          1618:     if test -z "$mcount_nonpic_call"; then
        !          1619:       AC_MSG_ERROR([Cannot find mcount call for non-PIC])
        !          1620:     fi
        !          1621:   else
        !          1622:     AC_MSG_ERROR([Cannot compile test program for non-PIC])
        !          1623:   fi
1.1       maekawa  1624: fi
                   1625:
1.1.1.3 ! ohara    1626: if test "$enable_shared" = yes; then
        !          1627:   gmp_asmout_compile="$CC $CFLAGS $CPPFLAGS $lt_prog_compiler_pic -S conftest.c 1>&AC_FD_CC"
        !          1628:   if AC_TRY_EVAL(gmp_asmout_compile); then
        !          1629:     if grep '\.data' conftest.s >/dev/null; then
        !          1630:       case $lt_prog_compiler_pic in
        !          1631:         *-DDLL_EXPORT*)
        !          1632:           # Windows DLLs have non-PIC style mcount
        !          1633:           mcount_pic_reg=`sed -n ['/esp/!s/.*movl.*,\(%[a-z]*\).*$/\1/p'] conftest.s`
        !          1634:           ;;
        !          1635:         *)
        !          1636:           mcount_pic_reg=`sed -n ['s/.*GOTOFF.*,\(%[a-z]*\).*$/\1/p'] conftest.s`
        !          1637:           ;;
        !          1638:       esac
        !          1639:     else
        !          1640:       mcount_pic_reg=
        !          1641:     fi
        !          1642:     mcount_pic_call=`grep 'call.*mcount' conftest.s`
        !          1643:     if test -z "$mcount_pic_call"; then
        !          1644:       AC_MSG_ERROR([Cannot find mcount call for PIC])
        !          1645:     fi
        !          1646:   else
        !          1647:     AC_MSG_ERROR([Cannot compile test program for PIC])
        !          1648:   fi
1.1       maekawa  1649: fi
                   1650:
1.1.1.3 ! ohara    1651: GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_REG>, <\`$mcount_nonpic_reg'>)"])
        !          1652: GMP_DEFINE_RAW(["define(<MCOUNT_NONPIC_CALL>,<\`$mcount_nonpic_call'>)"])
        !          1653: GMP_DEFINE_RAW(["define(<MCOUNT_PIC_REG>,    <\`$mcount_pic_reg'>)"])
        !          1654: GMP_DEFINE_RAW(["define(<MCOUNT_PIC_CALL>,   <\`$mcount_pic_call'>)"])
1.1       maekawa  1655:
1.1.1.3 ! ohara    1656: rm -f conftest.*
        !          1657: AC_MSG_RESULT([determined])
        !          1658: ])
1.1       maekawa  1659:
1.1.1.3 ! ohara    1660:
        !          1661: dnl  GMP_ASM_M68K_INSTRUCTION
        !          1662: dnl  ------------------------
        !          1663: dnl  Not sure if ".l" and "%" are independent settings, but it doesn't hurt
        !          1664: dnl  to try all four possibilities.  Note that the % ones must be first, so
        !          1665: dnl  "d0" won't be interpreted as a label.
1.1       maekawa  1666: dnl
1.1.1.3 ! ohara    1667: dnl  gas 1.92.3 on NetBSD 1.4 needs to be tested with a two operand
        !          1668: dnl  instruction.  It takes registers without "%", but a single operand
        !          1669: dnl  "clrl %d0" only gives a warning, not an error.
        !          1670:
        !          1671: AC_DEFUN(GMP_ASM_M68K_INSTRUCTION,
        !          1672: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1673: AC_CACHE_CHECK([assembler instruction and register style],
        !          1674:                gmp_cv_asm_m68k_instruction,
        !          1675: [gmp_cv_asm_m68k_instruction=unknown
        !          1676: for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do
        !          1677:   GMP_TRY_ASSEMBLE(
        !          1678:     [  $gmp_cv_asm_text
        !          1679:        $i],
        !          1680:     [gmp_cv_asm_m68k_instruction=$i
        !          1681:     rm -f conftest*
        !          1682:     break])
        !          1683: done
1.1       maekawa  1684: ])
1.1.1.3 ! ohara    1685: case $gmp_cv_asm_m68k_instruction in
        !          1686: "addl d0,d1")    want_dot_size=no;  want_register_percent=no  ;;
        !          1687: "addl %d0,%d1")  want_dot_size=no;  want_register_percent=yes ;;
        !          1688: "add.l d0,d1")   want_dot_size=yes; want_register_percent=no  ;;
        !          1689: "add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;;
        !          1690: *) AC_MSG_ERROR([cannot determine assembler instruction and register style]) ;;
        !          1691: esac
        !          1692: GMP_DEFINE_RAW(["define(<WANT_REGISTER_PERCENT>, <\`$want_register_percent'>)"])
        !          1693: GMP_DEFINE_RAW(["define(<WANT_DOT_SIZE>, <\`$want_dot_size'>)"])
1.1       maekawa  1694: ])
                   1695:
                   1696:
1.1.1.3 ! ohara    1697: dnl  GMP_ASM_M68K_ADDRESSING
        !          1698: dnl  -----------------------
1.1       maekawa  1699:
1.1.1.3 ! ohara    1700: AC_DEFUN(GMP_ASM_M68K_ADDRESSING,
        !          1701: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1702: AC_REQUIRE([GMP_ASM_M68K_INSTRUCTION])
        !          1703: AC_CACHE_CHECK([assembler addressing style],
        !          1704:                gmp_cv_asm_m68k_addressing,
        !          1705: [case $gmp_cv_asm_m68k_instruction in
        !          1706: addl*)  movel=movel ;;
        !          1707: add.l*) movel=move.l ;;
        !          1708: *) AC_MSG_ERROR([oops, unrecognised gmp_cv_asm_m68k_instruction]) ;;
        !          1709: esac
        !          1710: case $gmp_cv_asm_m68k_instruction in
        !          1711: *"%d0,%d1") dreg=%d0; areg=%a0 ;;
        !          1712: *"d0,d1")   dreg=d0;  areg=a0  ;;
        !          1713: *) AC_MSG_ERROR([oops, unrecognised gmp_cv_asm_m68k_instruction]) ;;
        !          1714: esac
        !          1715: GMP_TRY_ASSEMBLE(
        !          1716: [      $gmp_cv_asm_text
        !          1717:        $movel  $dreg, $areg@-],
        !          1718:   [gmp_cv_asm_m68k_addressing=mit],
        !          1719: [GMP_TRY_ASSEMBLE(
        !          1720: [      $gmp_cv_asm_text
        !          1721:        $movel  $dreg, -($areg)],
        !          1722:   [gmp_cv_asm_m68k_addressing=motorola],
        !          1723: [AC_MSG_ERROR([cannot determine assembler addressing style])])])
        !          1724: ])
        !          1725: GMP_DEFINE_RAW(["define(<WANT_ADDRESSING>, <\`$gmp_cv_asm_m68k_addressing'>)"])
        !          1726: ])
1.1       maekawa  1727:
                   1728:
1.1.1.3 ! ohara    1729: dnl  GMP_ASM_M68K_BRANCHES
        !          1730: dnl  ---------------------
        !          1731: dnl  "bra" is the standard branch instruction.  "jra" or "jbra" are
        !          1732: dnl  preferred where available, since on gas for instance they give a
        !          1733: dnl  displacement only as big as it needs to be, whereas "bra" is always
        !          1734: dnl  16-bits.  This applies to the conditional branches "bcc" etc too.
        !          1735: dnl  However "dbcc" etc on gas are already only as big as they need to be.
        !          1736:
        !          1737: AC_DEFUN(GMP_ASM_M68K_BRANCHES,
        !          1738: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1739: AC_CACHE_CHECK([assembler shortest branches],
        !          1740:                gmp_cv_asm_m68k_branches,
        !          1741: [gmp_cv_asm_m68k_branches=unknown
        !          1742: for i in jra jbra bra; do
        !          1743:   GMP_TRY_ASSEMBLE(
        !          1744: [      $gmp_cv_asm_text
        !          1745: foo$gmp_cv_asm_label_suffix
        !          1746:        $i      foo],
        !          1747:   [gmp_cv_asm_m68k_branches=$i
        !          1748:   rm -f conftest*
        !          1749:   break])
        !          1750: done
        !          1751: ])
        !          1752: if test "$gmp_cv_asm_m68k_branches" = unknown; then
        !          1753:   AC_MSG_ERROR([cannot determine assembler branching style])
1.1       maekawa  1754: fi
1.1.1.3 ! ohara    1755: GMP_DEFINE_RAW(["define(<WANT_BRANCHES>, <\`$gmp_cv_asm_m68k_branches'>)"])
1.1       maekawa  1756: ])
                   1757:
                   1758:
1.1.1.3 ! ohara    1759: dnl  GMP_ASM_POWERPC_R_REGISTERS
        !          1760: dnl  ---------------------------
        !          1761: dnl  Determine whether the assembler takes powerpc registers with an "r" as
        !          1762: dnl  in "r6", or as plain "6".  The latter is standard, but NeXT, Rhapsody,
        !          1763: dnl  and MacOS-X require the "r" forms.
        !          1764: dnl
        !          1765: dnl  See also mpn/powerpc32/powerpc-defs.m4 which uses the result of this
        !          1766: dnl  test.
1.1       maekawa  1767:
1.1.1.3 ! ohara    1768: AC_DEFUN(GMP_ASM_POWERPC_R_REGISTERS,
        !          1769: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1770: AC_CACHE_CHECK([if the assembler needs r on registers],
        !          1771:                gmp_cv_asm_powerpc_r_registers,
        !          1772: [GMP_TRY_ASSEMBLE(
        !          1773: [      $gmp_cv_asm_text
        !          1774:        mtctr   6],
        !          1775: [gmp_cv_asm_powerpc_r_registers=no],
        !          1776: [GMP_TRY_ASSEMBLE(
        !          1777: [      $gmp_cv_asm_text
        !          1778:        mtctr   r6],
        !          1779: [gmp_cv_asm_powerpc_r_registers=yes],
        !          1780: [AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])])])])
        !          1781:
        !          1782: GMP_DEFINE_RAW(["define(<WANT_R_REGISTERS>,<$gmp_cv_asm_powerpc_r_registers>)"])
        !          1783: ])
1.1       maekawa  1784:
1.1.1.3 ! ohara    1785:
        !          1786: dnl  GMP_ASM_SPARC_REGISTER
        !          1787: dnl  ----------------------
        !          1788: dnl  Determine whether the assembler accepts the ".register" directive.
        !          1789: dnl  Old versions of solaris "as" don't.
        !          1790: dnl
        !          1791: dnl  See also mpn/sparc32/sparc-defs.m4 which uses the result of this test.
        !          1792:
        !          1793: AC_DEFUN(GMP_ASM_SPARC_REGISTER,
        !          1794: [AC_REQUIRE([GMP_ASM_TEXT])
        !          1795: AC_CACHE_CHECK([if the assembler accepts ".register"],
        !          1796:                gmp_cv_asm_sparc_register,
        !          1797: [GMP_TRY_ASSEMBLE(
        !          1798: [      $gmp_cv_asm_text
        !          1799:        .register       %g2,#scratch
1.1       maekawa  1800: ],
1.1.1.3 ! ohara    1801: [gmp_cv_asm_sparc_register=yes],
        !          1802: [gmp_cv_asm_sparc_register=no])])
        !          1803:
        !          1804: GMP_DEFINE_RAW(["define(<HAVE_REGISTER>,<$gmp_cv_asm_sparc_register>)"])
1.1       maekawa  1805: ])
1.1.1.3 ! ohara    1806:
        !          1807:
        !          1808: dnl  GMP_C_ATTRIBUTE_CONST
        !          1809: dnl  ---------------------
        !          1810:
        !          1811: AC_DEFUN(GMP_C_ATTRIBUTE_CONST,
        !          1812: [AC_CACHE_CHECK([whether gcc __attribute__ ((const)) works],
        !          1813:                 gmp_cv_c_attribute_const,
        !          1814: [AC_TRY_COMPILE([int foo (int x) __attribute__ ((const));], ,
        !          1815:   gmp_cv_c_attribute_const=yes, gmp_cv_c_attribute_const=no)
        !          1816: ])
        !          1817: if test $gmp_cv_c_attribute_const = yes; then
        !          1818:   AC_DEFINE(HAVE_ATTRIBUTE_CONST, 1,
        !          1819:   [Define if the compiler accepts gcc style __attribute__ ((const))])
1.1       maekawa  1820: fi
                   1821: ])
                   1822:
                   1823:
1.1.1.3 ! ohara    1824: dnl  GMP_C_ATTRIBUTE_MALLOC
        !          1825: dnl  ----------------------
        !          1826: dnl  gcc 2.95.x accepts __attribute__ ((malloc)) but with a warning that
        !          1827: dnl  it's ignored.  Pretend it doesn't exist in this case, to avoid that
        !          1828: dnl  warning.
        !          1829:
        !          1830: AC_DEFUN(GMP_C_ATTRIBUTE_MALLOC,
        !          1831: [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works],
        !          1832:                 gmp_cv_c_attribute_malloc,
        !          1833: [cat >conftest.c <<EOF
        !          1834: void *foo (int x) __attribute__ ((malloc));
        !          1835: EOF
        !          1836: gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1"
        !          1837: if AC_TRY_EVAL(gmp_compile); then
        !          1838:   if grep "attribute directive ignored" conftest.out >/dev/null; then
        !          1839:     gmp_cv_c_attribute_malloc=no
        !          1840:   else
        !          1841:     gmp_cv_c_attribute_malloc=yes
        !          1842:   fi
        !          1843: else
        !          1844:   gmp_cv_c_attribute_malloc=no
        !          1845: fi
        !          1846: cat conftest.out >&AC_FD_CC
        !          1847: rm -f conftest*
        !          1848: ])
        !          1849: if test $gmp_cv_c_attribute_malloc = yes; then
        !          1850:   AC_DEFINE(HAVE_ATTRIBUTE_MALLOC, 1,
        !          1851:   [Define if the compiler accepts gcc style __attribute__ ((malloc))])
        !          1852: fi
        !          1853: ])
1.1       maekawa  1854:
                   1855:
1.1.1.3 ! ohara    1856: dnl  GMP_C_ATTRIBUTE_MODE
        !          1857: dnl  --------------------
        !          1858: dnl  Introduced in gcc 2.2, but perhaps not in all Apple derived versions.
        !          1859:
        !          1860: AC_DEFUN(GMP_C_ATTRIBUTE_MODE,
        !          1861: [AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works],
        !          1862:                 gmp_cv_c_attribute_mode,
        !          1863: [AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], ,
        !          1864:   gmp_cv_c_attribute_mode=yes, gmp_cv_c_attribute_mode=no)
        !          1865: ])
        !          1866: if test $gmp_cv_c_attribute_mode = yes; then
        !          1867:   AC_DEFINE(HAVE_ATTRIBUTE_MODE, 1,
        !          1868:   [Define if the compiler accepts gcc style __attribute__ ((mode (XX)))])
1.1       maekawa  1869: fi
1.1.1.2   maekawa  1870: ])
1.1       maekawa  1871:
                   1872:
1.1.1.3 ! ohara    1873: dnl  GMP_C_ATTRIBUTE_NORETURN
        !          1874: dnl  ------------------------
1.1       maekawa  1875:
1.1.1.3 ! ohara    1876: AC_DEFUN(GMP_C_ATTRIBUTE_NORETURN,
        !          1877: [AC_CACHE_CHECK([whether gcc __attribute__ ((noreturn)) works],
        !          1878:                 gmp_cv_c_attribute_noreturn,
        !          1879: [AC_TRY_COMPILE([void foo (int x) __attribute__ ((noreturn));], ,
        !          1880:   gmp_cv_c_attribute_noreturn=yes, gmp_cv_c_attribute_noreturn=no)
        !          1881: ])
        !          1882: if test $gmp_cv_c_attribute_noreturn = yes; then
        !          1883:   AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1,
        !          1884:   [Define if the compiler accepts gcc style __attribute__ ((noreturn))])
1.1       maekawa  1885: fi
1.1.1.3 ! ohara    1886: ])
1.1       maekawa  1887:
1.1.1.2   maekawa  1888:
1.1.1.3 ! ohara    1889: dnl  GMP_C_DOUBLE_FORMAT
        !          1890: dnl  -------------------
        !          1891: dnl  Determine the floating point format.
        !          1892: dnl
        !          1893: dnl  The object file is grepped, in order to work when cross compiling.  A
        !          1894: dnl  start and end sequence is included to avoid false matches, and
        !          1895: dnl  allowance is made for the desired data crossing an "od -b" line
        !          1896: dnl  boundary.  The test number is a small integer so it should appear
        !          1897: dnl  exactly, no rounding or truncation etc.
        !          1898: dnl
        !          1899: dnl  "od -b", incidentally, is supported even by Unix V7, and the awk script
        !          1900: dnl  used doesn't have functions or anything, so even an "old" awk should
        !          1901: dnl  suffice.
1.1.1.2   maekawa  1902:
1.1.1.3 ! ohara    1903: AC_DEFUN(GMP_C_DOUBLE_FORMAT,
        !          1904: [AC_REQUIRE([AC_PROG_CC])
        !          1905: AC_REQUIRE([AC_PROG_AWK])
        !          1906: AC_CACHE_CHECK([format of `double' floating point],
        !          1907:                 gmp_cv_c_double_format,
        !          1908: [gmp_cv_c_double_format=unknown
        !          1909: cat >conftest.c <<\EOF
        !          1910: [struct {
        !          1911:   char    before[8];
        !          1912:   double  x;
        !          1913:   char    after[8];
        !          1914: } foo = {
        !          1915:   { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF },
        !          1916:   -123456789.0,
        !          1917:   { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
        !          1918: };]
        !          1919: EOF
        !          1920: gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >&AC_FD_CC 2>&1"
        !          1921: if AC_TRY_EVAL(gmp_compile); then
        !          1922: cat >conftest.awk <<\EOF
        !          1923: [
        !          1924: BEGIN {
        !          1925:   found = 0
        !          1926: }
        !          1927:
        !          1928: {
        !          1929:   for (f = 2; f <= NF; f++)
        !          1930:     {
        !          1931:       for (i = 0; i < 23; i++)
        !          1932:         got[i] = got[i+1];
        !          1933:       got[23] = $f;
        !          1934:
        !          1935:       # match the special begin and end sequences
        !          1936:       if (got[0] != "001") continue
        !          1937:       if (got[1] != "043") continue
        !          1938:       if (got[2] != "105") continue
        !          1939:       if (got[3] != "147") continue
        !          1940:       if (got[4] != "211") continue
        !          1941:       if (got[5] != "253") continue
        !          1942:       if (got[6] != "315") continue
        !          1943:       if (got[7] != "357") continue
        !          1944:       if (got[16] != "376") continue
        !          1945:       if (got[17] != "334") continue
        !          1946:       if (got[18] != "272") continue
        !          1947:       if (got[19] != "230") continue
        !          1948:       if (got[20] != "166") continue
        !          1949:       if (got[21] != "124") continue
        !          1950:       if (got[22] != "062") continue
        !          1951:       if (got[23] != "020") continue
        !          1952:
        !          1953:       saw = " (" got[8] " " got[9] " " got[10] " " got[11] " " got[12] " " got[13] " " got[14] " " got[15] ")"
        !          1954:
        !          1955:       if (got[8]  == "000" &&  \
        !          1956:           got[9]  == "000" &&  \
        !          1957:           got[10] == "000" &&  \
        !          1958:           got[11] == "124" &&  \
        !          1959:           got[12] == "064" &&  \
        !          1960:           got[13] == "157" &&  \
        !          1961:           got[14] == "235" &&  \
        !          1962:           got[15] == "301")
        !          1963:         {
        !          1964:           print "IEEE little endian"
        !          1965:           found = 1
        !          1966:           exit
        !          1967:         }
        !          1968:
        !          1969:       # ARM style little endian but with the two 4-byte halves swapped
        !          1970:       if (got[8]  == "064" &&  \
        !          1971:           got[9]  == "157" &&  \
        !          1972:           got[10] == "235" &&  \
        !          1973:           got[11] == "301" &&  \
        !          1974:           got[12] == "000" &&  \
        !          1975:           got[13] == "000" &&  \
        !          1976:           got[14] == "000" &&  \
        !          1977:           got[15] == "124")
        !          1978:         {
        !          1979:           print "IEEE little endian, swapped halves"
        !          1980:           found = 1
        !          1981:           exit
        !          1982:         }
        !          1983:
        !          1984:       if (got[8]  == "301" &&  \
        !          1985:           got[9]  == "235" &&  \
        !          1986:           got[10] == "157" &&  \
        !          1987:           got[11] == "064" &&  \
        !          1988:           got[12] == "124" &&  \
        !          1989:           got[13] == "000" &&  \
        !          1990:           got[14] == "000" &&  \
        !          1991:          got[15] == "000")
        !          1992:         {
        !          1993:           print "IEEE big endian"
        !          1994:           found = 1
        !          1995:           exit
        !          1996:         }
        !          1997:
        !          1998:       if (got[8]  == "353" &&  \
        !          1999:           got[9]  == "315" &&  \
        !          2000:           got[10] == "242" &&  \
        !          2001:           got[11] == "171" &&  \
        !          2002:           got[12] == "000" &&  \
        !          2003:           got[13] == "240" &&  \
        !          2004:           got[14] == "000" &&  \
        !          2005:           got[15] == "000")
        !          2006:         {
        !          2007:           print "VAX D"
        !          2008:           found = 1
        !          2009:           exit
        !          2010:         }
        !          2011:
        !          2012:       if (got[8]  == "275" &&  \
        !          2013:           got[9]  == "301" &&  \
        !          2014:           got[10] == "064" &&  \
        !          2015:           got[11] == "157" &&  \
        !          2016:           got[12] == "000" &&  \
        !          2017:           got[13] == "124" &&  \
        !          2018:           got[14] == "000" &&  \
        !          2019:           got[15] == "000")
        !          2020:         {
        !          2021:           print "VAX G"
        !          2022:           found = 1
        !          2023:           exit
        !          2024:         }
        !          2025:
        !          2026:       if (got[8]  == "300" &&  \
        !          2027:           got[9]  == "033" &&  \
        !          2028:           got[10] == "353" &&  \
        !          2029:           got[11] == "171" &&  \
        !          2030:           got[12] == "242" &&  \
        !          2031:           got[13] == "240" &&  \
        !          2032:           got[14] == "000" &&  \
        !          2033:           got[15] == "000")
        !          2034:         {
        !          2035:           print "Cray CFP"
        !          2036:           found = 1
        !          2037:           exit
        !          2038:         }
        !          2039:     }
        !          2040: }
        !          2041:
        !          2042: END {
        !          2043:   if (! found)
        !          2044:     print "unknown", saw
        !          2045: }
        !          2046: ]
        !          2047: EOF
        !          2048:   gmp_cv_c_double_format=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`
        !          2049:   case $gmp_cv_c_double_format in
        !          2050:   unknown*)
        !          2051:     echo "cannot match anything, conftest.$OBJEXT contains" >&AC_FD_CC
        !          2052:     od -b conftest.$OBJEXT >&AC_FD_CC
        !          2053:     ;;
        !          2054:   esac
1.1.1.2   maekawa  2055: else
1.1.1.3 ! ohara    2056:   AC_MSG_WARN([oops, cannot compile test program])
1.1.1.2   maekawa  2057: fi
                   2058: ])
                   2059:
1.1.1.3 ! ohara    2060: AH_VERBATIM([HAVE_DOUBLE],
        !          2061: [/* Define one (and only one) of the following for the format of a `double'.
        !          2062:    If your format is not among these choices, or you don't know what it is,
        !          2063:    then leave all of them undefined.
        !          2064:    "IEEE_LITTLE_SWAPPED" means little endian, but with the two 4-byte halves
        !          2065:    swapped, as used by ARM CPUs in little endian mode.  */
        !          2066: #undef HAVE_DOUBLE_IEEE_BIG_ENDIAN
        !          2067: #undef HAVE_DOUBLE_IEEE_LITTLE_ENDIAN
        !          2068: #undef HAVE_DOUBLE_IEEE_LITTLE_SWAPPED
        !          2069: #undef HAVE_DOUBLE_VAX_D
        !          2070: #undef HAVE_DOUBLE_VAX_G
        !          2071: #undef HAVE_DOUBLE_CRAY_CFP])
        !          2072:
        !          2073: case $gmp_cv_c_double_format in
        !          2074:   "IEEE big endian")
        !          2075:     AC_DEFINE(HAVE_DOUBLE_IEEE_BIG_ENDIAN, 1) ;;
        !          2076:   "IEEE little endian")
        !          2077:     AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_ENDIAN, 1) ;;
        !          2078:   "IEEE little endian, swapped halves")
        !          2079:     AC_DEFINE(HAVE_DOUBLE_IEEE_LITTLE_SWAPPED, 1) ;;
        !          2080:   "VAX D")
        !          2081:     AC_DEFINE(HAVE_DOUBLE_VAX_D, 1) ;;
        !          2082:   "VAX G")
        !          2083:     AC_DEFINE(HAVE_DOUBLE_VAX_G, 1) ;;
        !          2084:   "Cray CFP")
        !          2085:     AC_DEFINE(HAVE_DOUBLE_CRAY_CFP, 1) ;;
        !          2086:   unknown*)
        !          2087:     ;;
        !          2088:   *)
        !          2089:     AC_MSG_WARN([oops, unrecognised float format: $gmp_cv_c_double_format])
        !          2090:     ;;
        !          2091: esac
        !          2092: ])
1.1.1.2   maekawa  2093:
1.1.1.3 ! ohara    2094:
        !          2095: dnl  GMP_C_INLINE
        !          2096: dnl  ------------
        !          2097: dnl  Establish an "inline" keyword, if possible.
        !          2098: dnl
        !          2099: dnl  This is the same as AC_C_INLINE, but introduing a typedef into the test
        !          2100: dnl  program.  Some versions of HP C succeed when the return value is a
        !          2101: dnl  plain builtin type like "int", but fail when it's a typedef.
        !          2102: dnl
        !          2103: dnl  FIXME: Hopefully autoconf will do this extra itself one day.
        !          2104:
        !          2105: AC_DEFUN(GMP_C_INLINE,
        !          2106: [AC_CACHE_CHECK([for inline], gmp_cv_c_inline,
        !          2107: [gmp_cv_c_inline=no
        !          2108: for i in inline __inline__ __inline; do
        !          2109:   AC_TRY_COMPILE(
        !          2110: [#ifndef __cplusplus
        !          2111: typedef int foo_t;
        !          2112: $i foo_t func1 () { return 0; }
        !          2113: static $i foo_t func2 () { return 0; }
        !          2114: #endif], ,
        !          2115:     [gmp_cv_c_inline=$i
        !          2116:     break])
        !          2117: done
        !          2118: if test $gmp_cv_c_inline = inline; then
        !          2119:   gmp_cv_c_inline=yes
1.1       maekawa  2120: fi
1.1.1.2   maekawa  2121: ])
1.1.1.3 ! ohara    2122: case $gmp_cv_c_inline in
        !          2123:   inline | yes) ;;
        !          2124:   no) AC_DEFINE(inline,,
        !          2125:                 [Define as `__inline' if that's what the C compiler calls it,
        !          2126:                  or to nothing if it is not supported.]) ;;
        !          2127:   *)  AC_DEFINE_UNQUOTED(inline, $gmp_cv_c_inline) ;;
        !          2128: esac
1.1.1.2   maekawa  2129: ])
                   2130:
                   2131:
1.1.1.3 ! ohara    2132: dnl  GMP_C_RESTRICT
        !          2133: dnl  --------------
        !          2134: dnl  Establish a "restrict" keyword, if possible, like AC_C_INLINE.
        !          2135: dnl
        !          2136: dnl  If restrict works already, then do nothing.  Otherwise AC_DEFINE it to
        !          2137: dnl  __restrict__ or __restrict if they work, or to empty otherwise.
        !          2138: dnl
        !          2139: dnl  "restrict" is in C99.  GCC 2.95 and up has it in c99 mode, and also as
        !          2140: dnl  __restrict__ and __restrict in all modes.
        !          2141: dnl
        !          2142: dnl  "yes" is used in the cache variable if plain "restrict" works, to make
        !          2143: dnl  the configure message look nicer.
        !          2144:
        !          2145: AC_DEFUN(GMP_C_RESTRICT,
        !          2146: [AC_CACHE_CHECK([for restrict], gmp_cv_c_restrict,
        !          2147: [gmp_cv_c_restrict=no
        !          2148: for r in restrict __restrict__ __restrict; do
        !          2149:   AC_TRY_COMPILE(, [char * $r foo;],
        !          2150:     [gmp_cv_c_restrict=$r
        !          2151:     break])
        !          2152: done
        !          2153: if test $gmp_cv_c_restrict = restrict; then
        !          2154:   gmp_cv_c_restrict=yes
1.1.1.2   maekawa  2155: fi
1.1.1.3 ! ohara    2156: ])
        !          2157: case $gmp_cv_c_restrict in
        !          2158:   restrict | yes) ;;
        !          2159:   no) AC_DEFINE(restrict,,
        !          2160:                 [Define as `__restrict' if that's what the C compiler calls it,
        !          2161:                  or to nothing if it is not supported.]) ;;
        !          2162:   *)  AC_DEFINE_UNQUOTED(restrict, $gmp_cv_c_restrict) ;;
        !          2163: esac
1.1.1.2   maekawa  2164: ])
                   2165:
1.1.1.3 ! ohara    2166:
        !          2167: dnl  GMP_C_SIZES
        !          2168: dnl  -----------
        !          2169: dnl  Determine some sizes, if not alredy provided by gmp-mparam.h.
        !          2170: dnl  $gmp_mparam_source is the selected gmp-mparam.h.
        !          2171: dnl
        !          2172: dnl  BITS_PER_MP_LIMB, BYTES_PER_MP_LIMB and BITS_PER_ULONG are needed at
        !          2173: dnl  preprocessing time when building the library, for use in #if
        !          2174: dnl  conditionals.
        !          2175: dnl
        !          2176: dnl  BITS_PER_MP_LIMB is also wanted as a plain constant for some macros in
        !          2177: dnl  the generated gmp.h, and is instantiated as BITS_PER_MP_LIMB.
        !          2178: dnl
        !          2179: dnl  If some assembler code depends on a particular type size it's probably
        !          2180: dnl  best to put explicit #defines for these in gmp-mparam.h.  That way if
        !          2181: dnl  strange compiler options change the size then a mismatch will be
        !          2182: dnl  detected by t-constants.c rather than only by the code crashing or
        !          2183: dnl  giving wrong results.
        !          2184: dnl
        !          2185: dnl  None of the assembler code depends on BITS_PER_ULONG currently, so it's
        !          2186: dnl  just as easy to let configure find its size as to put explicit values.
        !          2187: dnl
        !          2188: dnl  The tests here assume bits=8*sizeof, but that might not be universally
        !          2189: dnl  true.  It'd be better to probe for how many bits seem to work, like
        !          2190: dnl  t-constants does.  But all currently supported systems have limbs and
        !          2191: dnl  ulongs with bits=8*sizeof, so it's academic.  Strange systems can
        !          2192: dnl  always have the right values put in gmp-mparam.h explicitly.
        !          2193:
        !          2194: AC_DEFUN(GMP_C_SIZES,
        !          2195: [BITS_PER_MP_LIMB=[`sed -n 's/^#define BITS_PER_MP_LIMB[       ][      ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`]
        !          2196: if test -n "$BITS_PER_MP_LIMB" \
        !          2197:    && grep "^#define BYTES_PER_MP_LIMB" $gmp_mparam_source >/dev/null; then : ;
1.1.1.2   maekawa  2198: else
1.1.1.3 ! ohara    2199:   AC_CHECK_SIZEOF(mp_limb_t,,
        !          2200: [#include <stdio.h>]
        !          2201: GMP_INCLUDE_GMP_H)
        !          2202:   if test "$ac_cv_sizeof_mp_limb_t" = 0; then
        !          2203:     AC_MSG_ERROR([some sort of compiler problem, mp_limb_t doesn't seem to work])
        !          2204:   fi
        !          2205:   if test -z "$BITS_PER_MP_LIMB"; then
        !          2206:     BITS_PER_MP_LIMB="(8*$ac_cv_sizeof_mp_limb_t)"
        !          2207:   fi
        !          2208:   if grep "^#define BYTES_PER_MP_LIMB" $gmp_mparam_source >/dev/null; then : ;
1.1.1.2   maekawa  2209:   else
1.1.1.3 ! ohara    2210:     AC_DEFINE_UNQUOTED(BYTES_PER_MP_LIMB, $ac_cv_sizeof_mp_limb_t,
        !          2211:                        [bytes per mp_limb_t, if not in gmp-mparam.h])
1.1.1.2   maekawa  2212:   fi
                   2213: fi
1.1.1.3 ! ohara    2214: AC_SUBST(BITS_PER_MP_LIMB)
        !          2215: define([GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB],
        !          2216: [[#define __GMP_BITS_PER_MP_LIMB $BITS_PER_MP_LIMB
        !          2217: #define GMP_LIMB_BITS $BITS_PER_MP_LIMB]])
        !          2218:
        !          2219: if grep "^#define BITS_PER_ULONG" $gmp_mparam_source >/dev/null; then : ;
1.1.1.2   maekawa  2220: else
1.1.1.3 ! ohara    2221:   case $limb_chosen in
        !          2222:   longlong)
        !          2223:     AC_CHECK_SIZEOF(unsigned long)
        !          2224:     AC_DEFINE_UNQUOTED(BITS_PER_ULONG, (8 * $ac_cv_sizeof_unsigned_long),
        !          2225:                        [bits per unsigned long, if not in gmp-mparam.h])
        !          2226:     ;;
        !          2227:   *)
        !          2228:     # Copy the limb size when a limb is a ulong
        !          2229:     AC_DEFINE(BITS_PER_ULONG, BITS_PER_MP_LIMB)
        !          2230:     ;;
        !          2231:   esac
1.1.1.2   maekawa  2232: fi
                   2233: ])
                   2234:
                   2235:
1.1.1.3 ! ohara    2236: dnl  GMP_C_STDARG
        !          2237: dnl  ------------
        !          2238: dnl  Test whether to use <stdarg.h> or <varargs.h>.
1.1.1.2   maekawa  2239: dnl
1.1.1.3 ! ohara    2240: dnl  Notice the AC_DEFINE here is HAVE_STDARG to avoid clashing with
        !          2241: dnl  HAVE_STDARG_H which could arise from AC_CHECK_HEADERS.
        !          2242: dnl
        !          2243: dnl  This test might be slight overkill, after all there's really only going
        !          2244: dnl  to be ANSI or K&R and the two can be differentiated by AC_PROG_CC_STDC
        !          2245: dnl  or very likely by the setups for _PROTO in gmp.h.  On the other hand
        !          2246: dnl  this test is nice and direct, being what we're going to actually use.
        !          2247:
        !          2248: AC_DEFUN(GMP_C_STDARG,
        !          2249: [AC_CACHE_CHECK([whether <stdarg.h> exists and works],
        !          2250:                 gmp_cv_c_stdarg,
        !          2251: [AC_TRY_COMPILE(
        !          2252: [#include <stdarg.h>
        !          2253: int foo (int x, ...)
        !          2254: {
        !          2255:   va_list  ap;
        !          2256:   int      y;
        !          2257:   va_start (ap, x);
        !          2258:   y = va_arg (ap, int);
        !          2259:   va_end (ap);
        !          2260:   return y;
        !          2261: }],,
        !          2262: gmp_cv_c_stdarg=yes, gmp_cv_c_stdarg=no)
        !          2263: ])
        !          2264: if test $gmp_cv_c_stdarg = yes; then
        !          2265:   AC_DEFINE(HAVE_STDARG, 1, [Define if <stdarg.h> exists and works])
        !          2266: fi
        !          2267: ])
1.1       maekawa  2268:
                   2269:
1.1.1.3 ! ohara    2270: dnl  GMP_FUNC_ALLOCA
        !          2271: dnl  ---------------
        !          2272: dnl  Determine whether "alloca" is available.  This is AC_FUNC_ALLOCA from
        !          2273: dnl  autoconf, but changed so it doesn't use alloca.c if alloca() isn't
        !          2274: dnl  available, and also to use gmp-impl.h for the conditionals detecting
        !          2275: dnl  compiler builtin alloca's.
        !          2276:
        !          2277: AC_DEFUN(GMP_FUNC_ALLOCA,
        !          2278: [AC_REQUIRE([GMP_HEADER_ALLOCA])
        !          2279: AC_CACHE_CHECK([for alloca (via gmp-impl.h)],
        !          2280:                gmp_cv_func_alloca,
        !          2281: [AC_TRY_LINK(
        !          2282: GMP_INCLUDE_GMP_H
        !          2283: [#include "$srcdir/gmp-impl.h"
        !          2284: ],
        !          2285:   [char *p = (char *) alloca (1);],
        !          2286:   gmp_cv_func_alloca=yes,
        !          2287:   gmp_cv_func_alloca=no)])
        !          2288: if test $gmp_cv_func_alloca = yes; then
        !          2289:   AC_DEFINE(HAVE_ALLOCA, 1,
        !          2290:     [Define if alloca() works (via gmp-impl.h).])
        !          2291: fi
        !          2292: ])
1.1       maekawa  2293:
1.1.1.3 ! ohara    2294: AC_DEFUN(GMP_HEADER_ALLOCA,
        !          2295: [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
        !          2296: # for constant arguments.  Useless!
        !          2297: AC_CACHE_CHECK([for working alloca.h],
        !          2298:                gmp_cv_header_alloca,
        !          2299: [AC_TRY_LINK([#include <alloca.h>],
        !          2300:   [char *p = (char *) alloca (2 * sizeof (int));],
        !          2301:   gmp_cv_header_alloca=yes,
        !          2302:   gmp_cv_header_alloca=no)])
        !          2303: if test $gmp_cv_header_alloca = yes; then
        !          2304:   AC_DEFINE(HAVE_ALLOCA_H, 1,
        !          2305:     [Define if you have <alloca.h> and it should be used (not on Ultrix).])
        !          2306: fi
        !          2307: ])
1.1       maekawa  2308:
                   2309:
1.1.1.3 ! ohara    2310: dnl  GMP_OPTION_ALLOCA
        !          2311: dnl  -----------------
        !          2312: dnl  Decide what to do about --enable-alloca from the user.
        !          2313: dnl  This is a macro so it can require GMP_FUNC_ALLOCA.
        !          2314:
        !          2315: AC_DEFUN(GMP_OPTION_ALLOCA,
        !          2316: [AC_REQUIRE([GMP_FUNC_ALLOCA])
        !          2317: AC_CACHE_CHECK([how to allocate temporary memory],
        !          2318:                gmp_cv_option_alloca,
        !          2319: [case $enable_alloca in
        !          2320:   yes)
        !          2321:     gmp_cv_option_alloca=alloca
        !          2322:     ;;
        !          2323:   no)
        !          2324:     gmp_cv_option_alloca=malloc-reentrant
        !          2325:     ;;
        !          2326:   reentrant | notreentrant)
        !          2327:     case $gmp_cv_func_alloca in
        !          2328:     yes)  gmp_cv_option_alloca=alloca ;;
        !          2329:     *)    gmp_cv_option_alloca=malloc-$enable_alloca ;;
        !          2330:     esac
        !          2331:     ;;
        !          2332:   *)
        !          2333:     gmp_cv_option_alloca=$enable_alloca
        !          2334:     ;;
        !          2335: esac
        !          2336: ])
        !          2337: case $gmp_cv_option_alloca in
        !          2338:   alloca)
        !          2339:     if test $gmp_cv_func_alloca = no; then
        !          2340:       AC_MSG_ERROR([--enable-alloca=alloca specified, but alloca not available])
        !          2341:     fi
        !          2342:     AC_DEFINE(WANT_TMP_ALLOCA, 1, [--enable-alloca=yes])
        !          2343:     ;;
        !          2344:   malloc-reentrant)
        !          2345:     AC_DEFINE(WANT_TMP_REENTRANT, 1, [--enable-alloca=malloc-reentrant])
        !          2346:     TAL_OBJECT=tal-reent$U.lo
        !          2347:     ;;
        !          2348:   malloc-notreentrant)
        !          2349:     AC_DEFINE(WANT_TMP_NOTREENTRANT, 1, [--enable-alloca=malloc-notreentrant])
        !          2350:     TAL_OBJECT=tal-notreent$U.lo
        !          2351:     ;;
        !          2352:   debug)
        !          2353:     AC_DEFINE(WANT_TMP_DEBUG, 1, [--enable-alloca=debug])
        !          2354:     TAL_OBJECT=tal-debug$U.lo
        !          2355:     ;;
        !          2356:   *)
        !          2357:     # checks at the start of configure.in should protect us
        !          2358:     AC_MSG_ERROR([unrecognised --enable-alloca=$gmp_cv_option_alloca])
        !          2359:     ;;
        !          2360: esac
        !          2361: AC_SUBST(TAL_OBJECT)
        !          2362: ])
1.1       maekawa  2363:
                   2364:
1.1.1.3 ! ohara    2365: dnl  GMP_FUNC_SSCANF_WRITABLE_INPUT
        !          2366: dnl  ------------------------------
        !          2367: dnl  Determine whether sscanf requires a writable input string.
        !          2368: dnl
        !          2369: dnl  FIXME: Run a program to try this, when doing a native build.
        !          2370:
        !          2371: AC_DEFUN(GMP_FUNC_SSCANF_WRITABLE_INPUT,
        !          2372: [AC_CACHE_CHECK([whether sscanf needs writable input],
        !          2373:                  gmp_cv_func_sscanf_writable_input,
        !          2374: [case $host in
        !          2375:   *-*-hpux9 | *-*-hpux9.*)
        !          2376:      gmp_cv_func_sscanf_writable_input=yes ;;
        !          2377:   *) gmp_cv_func_sscanf_writable_input=no  ;;
        !          2378: esac
        !          2379: ])
        !          2380: case $gmp_cv_func_sscanf_writable_input in
        !          2381:   yes) AC_DEFINE(SSCANF_WRITABLE_INPUT, 1,
        !          2382:                  [Define if sscanf requires writable inputs]) ;;
        !          2383:   no)  ;;
        !          2384:   *)   AC_MSG_ERROR([unrecognised \$gmp_cv_func_sscanf_writable_input]) ;;
        !          2385: esac
        !          2386: ])
        !          2387:
        !          2388:
        !          2389: dnl  GMP_FUNC_VSNPRINTF
        !          2390: dnl  ------------------
        !          2391: dnl  Check whether vsnprintf exists, and works properly.
        !          2392: dnl
        !          2393: dnl  Sparc Solaris 2.7 in 64-bit mode doesn't always truncate, making
        !          2394: dnl  vsnprintf like vsprintf, and hence completely useless.  On one system a
        !          2395: dnl  literal string is enough to provoke the problem, on another a "%n" was
        !          2396: dnl  needed.  There seems to be something weird going on with the optimizer
        !          2397: dnl  or something, since on the first system adding a second check with
        !          2398: dnl  "%n", or even just an initialized local variable, makes it work.  In
        !          2399: dnl  any case, without bothering to get to the bottom of this, the two
        !          2400: dnl  program runs in the code below end up successfully detecting the
        !          2401: dnl  problem.
        !          2402: dnl
        !          2403: dnl  glibc 2.0.x returns either -1 or bufsize-1 for an overflow (both seen,
        !          2404: dnl  not sure which 2.0.x does which), but still puts the correct null
        !          2405: dnl  terminated result into the buffer.
        !          2406:
        !          2407: AC_DEFUN(GMP_FUNC_VSNPRINTF,
        !          2408: [AC_REQUIRE([GMP_C_STDARG])
        !          2409: AC_CHECK_FUNC(vsnprintf,
        !          2410:               [gmp_vsnprintf_exists=yes],
        !          2411:               [gmp_vsnprintf_exists=no])
        !          2412: if test "$gmp_vsnprintf_exists" = no; then
        !          2413:   gmp_cv_func_vsnprintf=no
1.1       maekawa  2414: else
1.1.1.3 ! ohara    2415:   AC_CACHE_CHECK([whether vsnprintf works],
        !          2416:                  gmp_cv_func_vsnprintf,
        !          2417:   [gmp_cv_func_vsnprintf=yes
        !          2418:    for i in 'check ("hello world");' 'int n; check ("%nhello world", &n);'; do
        !          2419:      AC_TRY_RUN([
        !          2420: #include <string.h>  /* for strcmp */
        !          2421: #include <stdio.h>   /* for vsnprintf */
        !          2422:
        !          2423: #if HAVE_STDARG
        !          2424: #include <stdarg.h>
        !          2425: #else
        !          2426: #include <varargs.h>
        !          2427: #endif
        !          2428:
        !          2429: int
        !          2430: #if HAVE_STDARG
        !          2431: check (const char *fmt, ...)
        !          2432: #else
        !          2433: check (va_alist)
        !          2434:      va_dcl
        !          2435: #endif
        !          2436: {
        !          2437:   static char  buf[128];
        !          2438:   va_list  ap;
        !          2439:   int      ret;
        !          2440:
        !          2441: #if HAVE_STDARG
        !          2442:   va_start (ap, fmt);
        !          2443: #else
        !          2444:   char *fmt;
        !          2445:   va_start (ap);
        !          2446:   fmt = va_arg (ap, char *);
        !          2447: #endif
        !          2448:
        !          2449:   ret = vsnprintf (buf, 4, fmt, ap);
        !          2450:
        !          2451:   if (strcmp (buf, "hel") != 0)
        !          2452:     exit (1);
        !          2453:
        !          2454:   /* allowed return values */
        !          2455:   if (ret != -1 && ret != 3 && ret != 11)
        !          2456:     exit (2);
1.1       maekawa  2457:
1.1.1.3 ! ohara    2458:   return 0;
        !          2459: }
1.1       maekawa  2460:
1.1.1.3 ! ohara    2461: int
        !          2462: main ()
        !          2463: {
        !          2464: $i
        !          2465:   exit (0);
        !          2466: }
        !          2467: ],
        !          2468:       [:],
        !          2469:       [gmp_cv_func_vsnprintf=no; break],
        !          2470:       [gmp_cv_func_vsnprintf=probably; break])
        !          2471:   done
        !          2472:   ])
        !          2473:   if test "$gmp_cv_func_vsnprintf" = probably; then
        !          2474:     AC_MSG_WARN([cannot check for properly working vsnprintf when cross compiling, will assume it's ok])
        !          2475:   fi
        !          2476:   if test "$gmp_cv_func_vsnprintf" != no; then
        !          2477:     AC_DEFINE(HAVE_VSNPRINTF,1,
        !          2478:               [Define if you have vsnprintf and it works properly.])
        !          2479:   fi
        !          2480: fi
        !          2481: ])
        !          2482:
        !          2483:
        !          2484: dnl  GMP_H_ANSI
        !          2485: dnl  ----------
        !          2486: dnl  Check whether gmp.h recognises the compiler as ANSI capable.
        !          2487:
        !          2488: AC_DEFUN(GMP_H_ANSI,
        !          2489: [AC_REQUIRE([AC_PROG_CC_STDC])
        !          2490: case $ac_cv_prog_cc_stdc in
        !          2491:   no)
        !          2492:     ;;
        !          2493:   *)
        !          2494:     AC_TRY_COMPILE(
        !          2495: GMP_INCLUDE_GMP_H
        !          2496: [#if ! __GMP_HAVE_PROTOTYPES
        !          2497: die die die
        !          2498: #endif
        !          2499: ],,,
        !          2500:     [AC_MSG_WARN([gmp.h doesnt recognise compiler as ANSI, prototypes and "const" will be unavailable])])
        !          2501:     ;;
        !          2502: esac
        !          2503: ])
        !          2504:
        !          2505:
        !          2506: dnl  GMP_H_EXTERN_INLINE
        !          2507: dnl  -------------------
        !          2508: dnl  If the compiler has an "inline" of some sort, check whether the
        !          2509: dnl  #ifdef's in gmp.h recognise it.
        !          2510:
        !          2511: AC_DEFUN(GMP_H_EXTERN_INLINE,
        !          2512: [AC_REQUIRE([GMP_C_INLINE])
        !          2513: case $gmp_cv_c_inline in
        !          2514: no) ;;
        !          2515: *)
        !          2516:   AC_TRY_COMPILE(
        !          2517: [#define __GMP_WITHIN_CONFIGURE_INLINE 1
        !          2518: ]GMP_INCLUDE_GMP_H[
        !          2519: #ifndef __GMP_EXTERN_INLINE
        !          2520: die die die
        !          2521: #endif
        !          2522: ],,,
        !          2523:   [case $gmp_cv_c_inline in
        !          2524:   yes) tmp_inline=inline ;;
        !          2525:   *)   tmp_inline=$gmp_cv_c_inline ;;
        !          2526:   esac
        !          2527:   AC_MSG_WARN([gmp.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])])
        !          2528:   ;;
        !          2529: esac
        !          2530: ])
        !          2531:
        !          2532:
        !          2533: dnl  GMP_H_HAVE_FILE
        !          2534: dnl  ---------------
        !          2535: dnl  Check whether the #ifdef's in gmp.h recognise when stdio.h has been
        !          2536: dnl  included to get FILE.
        !          2537:
        !          2538: AC_DEFUN(GMP_H_HAVE_FILE,
        !          2539: [AC_TRY_COMPILE(
        !          2540: [#include <stdio.h>]
        !          2541: GMP_INCLUDE_GMP_H
        !          2542: [#if ! _GMP_H_HAVE_FILE
        !          2543: die die die
        !          2544: #endif
        !          2545: ],,,
        !          2546:   [AC_MSG_WARN([gmp.h doesnt recognise <stdio.h>, FILE prototypes will be unavailable])])
        !          2547: ])
        !          2548:
        !          2549:
        !          2550: dnl  GMP_IMPL_H_IEEE_FLOATS
        !          2551: dnl  ----------------------
        !          2552: dnl  Check whether the #ifdef's in gmp-impl.h recognise IEEE format and
        !          2553: dnl  endianness.
        !          2554:
        !          2555: AC_DEFUN(GMP_IMPL_H_IEEE_FLOATS,
        !          2556: [case $host in
        !          2557:   vax*-*-*)
        !          2558:     # not IEEE (neither D nor G formats are IEEE)
        !          2559:     ;;
        !          2560:   none-*-*)
        !          2561:     # don't worry about this when CPU "none"
        !          2562:     ;;
        !          2563:   *)
        !          2564:     case $path in
        !          2565:       *cray/cfp*)
        !          2566:         # not IEEE
        !          2567:         ;;
        !          2568:       *)
        !          2569:         AC_TRY_COMPILE(
        !          2570: [#include <stdio.h>]
        !          2571: GMP_INCLUDE_GMP_H
        !          2572: [#include "$srcdir/gmp-impl.h"
        !          2573: #ifndef _GMP_IEEE_FLOATS
        !          2574: die die die
        !          2575: #endif
        !          2576: ],,,[
        !          2577:           AC_MSG_WARN([gmp-impl.h doesnt recognise "double" as IEEE.])
        !          2578:           AC_MSG_WARN([If your CPU floats are in fact IEEE then you])
        !          2579:          AC_MSG_WARN([might like to augment the tests there.])
        !          2580:         ])
        !          2581:         ;;
        !          2582:     esac
        !          2583:     ;;
        !          2584: esac
        !          2585: ])
1.1       maekawa  2586:
1.1.1.3 ! ohara    2587: # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1.1       maekawa  2588:
1.1.1.3 ! ohara    2589: # serial 47 AC_PROG_LIBTOOL
1.1       maekawa  2590:
1.1.1.3 ! ohara    2591: # AC_PROG_LIBTOOL
        !          2592: # ---------------
        !          2593: AC_DEFUN([AC_PROG_LIBTOOL],
        !          2594: [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
        !          2595: dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
        !          2596: dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
        !          2597:   AC_PROVIDE_IFELSE([AC_PROG_CXX],
        !          2598:     [AC_LIBTOOL_CXX],
        !          2599:     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
        !          2600:   ])])
        !          2601:
        !          2602: dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
        !          2603: dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
        !          2604: dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
        !          2605:   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
        !          2606:     [AC_LIBTOOL_GCJ],
        !          2607:     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
        !          2608:       [AC_LIBTOOL_GCJ],
        !          2609:       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
        !          2610:        [AC_LIBTOOL_GCJ],
        !          2611:       [ifdef([AC_PROG_GCJ],
        !          2612:             [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
        !          2613:        ifdef([A][M_PROG_GCJ],
        !          2614:             [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
        !          2615:        ifdef([LT_AC_PROG_GCJ],
        !          2616:             [define([LT_AC_PROG_GCJ],
        !          2617:                defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
        !          2618: ])])# AC_PROG_LIBTOOL
        !          2619:
        !          2620:
        !          2621: # _AC_PROG_LIBTOOL
        !          2622: # ----------------
        !          2623: AC_DEFUN([_AC_PROG_LIBTOOL],
        !          2624: [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
        !          2625: AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
        !          2626: AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1.1       maekawa  2627:
                   2628: # This can be used to rebuild libtool when needed
1.1.1.3 ! ohara    2629: LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1.1       maekawa  2630:
                   2631: # Always use our own libtool.
                   2632: LIBTOOL='$(SHELL) $(top_builddir)/libtool'
                   2633: AC_SUBST(LIBTOOL)dnl
                   2634:
1.1.1.3 ! ohara    2635: # Prevent multiple expansion
        !          2636: define([AC_PROG_LIBTOOL], [])
        !          2637: ])# _AC_PROG_LIBTOOL
        !          2638:
1.1       maekawa  2639:
1.1.1.3 ! ohara    2640: # AC_LIBTOOL_SETUP
        !          2641: # ----------------
        !          2642: AC_DEFUN([AC_LIBTOOL_SETUP],
        !          2643: [AC_PREREQ(2.50)dnl
1.1       maekawa  2644: AC_REQUIRE([AC_ENABLE_SHARED])dnl
                   2645: AC_REQUIRE([AC_ENABLE_STATIC])dnl
                   2646: AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
                   2647: AC_REQUIRE([AC_CANONICAL_HOST])dnl
                   2648: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
                   2649: AC_REQUIRE([AC_PROG_CC])dnl
                   2650: AC_REQUIRE([AC_PROG_LD])dnl
1.1.1.2   maekawa  2651: AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1.1       maekawa  2652: AC_REQUIRE([AC_PROG_NM])dnl
                   2653: AC_REQUIRE([AC_PROG_LN_S])dnl
1.1.1.2   maekawa  2654: AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1.1.1.3 ! ohara    2655: # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1.1.1.2   maekawa  2656: AC_REQUIRE([AC_OBJEXT])dnl
                   2657: AC_REQUIRE([AC_EXEEXT])dnl
1.1       maekawa  2658: dnl
                   2659:
1.1.1.3 ! ohara    2660: AC_LIBTOOL_SYS_MAX_CMD_LEN
        !          2661: AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
        !          2662: AC_LIBTOOL_OBJDIR
        !          2663:
        !          2664: AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
        !          2665: _LT_AC_PROG_ECHO_BACKSLASH
        !          2666:
        !          2667: case $host_os in
        !          2668: aix3*)
        !          2669:   # AIX sometimes has problems with the GCC collect2 program.  For some
        !          2670:   # reason, if we set the COLLECT_NAMES environment variable, the problems
        !          2671:   # vanish in a puff of smoke.
        !          2672:   if test "X${COLLECT_NAMES+set}" != Xset; then
        !          2673:     COLLECT_NAMES=
        !          2674:     export COLLECT_NAMES
        !          2675:   fi
        !          2676:   ;;
        !          2677: esac
        !          2678:
        !          2679: # Sed substitution that helps us do robust quoting.  It backslashifies
        !          2680: # metacharacters that are still active within double-quoted strings.
        !          2681: Xsed='sed -e s/^X//'
        !          2682: [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
        !          2683:
        !          2684: # Same as above, but do not quote variable references.
        !          2685: [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
        !          2686:
        !          2687: # Sed substitution to delay expansion of an escaped shell variable in a
        !          2688: # double_quote_subst'ed string.
        !          2689: delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
        !          2690:
        !          2691: # Sed substitution to avoid accidental globbing in evaled expressions
        !          2692: no_glob_subst='s/\*/\\\*/g'
        !          2693:
        !          2694: # Constants:
        !          2695: rm="rm -f"
        !          2696:
        !          2697: # Global variables:
        !          2698: default_ofile=libtool
        !          2699: can_build_shared=yes
        !          2700:
        !          2701: # All known linkers require a `.a' archive for static linking (except M$VC,
        !          2702: # which needs '.lib').
        !          2703: libext=a
        !          2704: ltmain="$ac_aux_dir/ltmain.sh"
        !          2705: ofile="$default_ofile"
        !          2706: with_gnu_ld="$lt_cv_prog_gnu_ld"
        !          2707:
        !          2708: AC_CHECK_TOOL(RANLIB, ranlib, :)
        !          2709: AC_CHECK_TOOL(STRIP, strip, :)
        !          2710:
        !          2711: old_CC="$CC"
        !          2712: old_CFLAGS="$CFLAGS"
        !          2713:
        !          2714: # Set sane defaults for various variables
        !          2715: test -z "$AR" && AR=ar
        !          2716: test -z "$AR_FLAGS" && AR_FLAGS=cru
        !          2717: test -z "$AS" && AS=as
        !          2718: test -z "$CC" && CC=cc
        !          2719: test -z "$LTCC" && LTCC=$CC
        !          2720: test -z "$DLLTOOL" && DLLTOOL=dlltool
        !          2721: test -z "$LD" && LD=ld
        !          2722: test -z "$LN_S" && LN_S="ln -s"
        !          2723: test -z "$MAGIC_CMD" && MAGIC_CMD=file
        !          2724: test -z "$NM" && NM=nm
        !          2725: test -z "$OBJDUMP" && OBJDUMP=objdump
        !          2726: test -z "$RANLIB" && RANLIB=:
        !          2727: test -z "$STRIP" && STRIP=:
        !          2728: test -z "$ac_objext" && ac_objext=o
        !          2729:
        !          2730: # Determine commands to create old-style static archives.
        !          2731: old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
        !          2732: old_postinstall_cmds='chmod 644 $oldlib'
        !          2733: old_postuninstall_cmds=
        !          2734:
        !          2735: if test -n "$RANLIB"; then
        !          2736:   case $host_os in
        !          2737:   openbsd*)
        !          2738:     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
        !          2739:     ;;
        !          2740:   *)
        !          2741:     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
        !          2742:     ;;
        !          2743:   esac
        !          2744:   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
        !          2745: fi
        !          2746:
1.1.1.2   maekawa  2747: # Only perform the check for file, if the check method requires it
1.1.1.3 ! ohara    2748: case $deplibs_check_method in
1.1.1.2   maekawa  2749: file_magic*)
1.1.1.3 ! ohara    2750:   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1.1.1.2   maekawa  2751:     AC_PATH_MAGIC
                   2752:   fi
                   2753:   ;;
                   2754: esac
                   2755:
1.1.1.3 ! ohara    2756: ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
        !          2757: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
        !          2758: enable_win32_dll=yes, enable_win32_dll=no)
        !          2759:
        !          2760: AC_ARG_ENABLE([libtool-lock],
        !          2761:     [AC_HELP_STRING([--disable-libtool-lock],
        !          2762:        [avoid locking (might break parallel builds)])])
        !          2763: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
        !          2764:
        !          2765: AC_ARG_WITH([pic],
        !          2766:     [AC_HELP_STRING([--with-pic],
        !          2767:        [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
        !          2768:     [pic_mode="$withval"],
        !          2769:     [pic_mode=default])
        !          2770: test -z "$pic_mode" && pic_mode=default
        !          2771:
        !          2772: # Use C for the default configuration in the libtool script
        !          2773: tagname=
        !          2774: AC_LIBTOOL_LANG_C_CONFIG
        !          2775: _LT_AC_TAGCONFIG
        !          2776: ])# AC_LIBTOOL_SETUP
        !          2777:
        !          2778:
        !          2779: # _LT_AC_SYS_COMPILER
        !          2780: # -------------------
        !          2781: AC_DEFUN([_LT_AC_SYS_COMPILER],
        !          2782: [AC_REQUIRE([AC_PROG_CC])dnl
        !          2783:
        !          2784: # If no C compiler was specified, use CC.
        !          2785: LTCC=${LTCC-"$CC"}
        !          2786:
        !          2787: # Allow CC to be a program name with arguments.
        !          2788: set dummy $CC
        !          2789: compiler="[$]2"
        !          2790: ])# _LT_AC_SYS_COMPILER
        !          2791:
        !          2792:
        !          2793: # _LT_AC_SYS_LIBPATH_AIX
        !          2794: # ----------------------
        !          2795: # Links a minimal program and checks the executable
        !          2796: # for the system default hardcoded library path. In most cases,
        !          2797: # this is /usr/lib:/lib, but when the MPI compilers are used
        !          2798: # the location of the communication and MPI libs are included too.
        !          2799: # If we don't find anything, use the default library path according
        !          2800: # to the aix ld manual.
        !          2801: AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
        !          2802: [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
        !          2803: aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
        !          2804: }'`
        !          2805: # Check for a 64-bit object if we didn't find anything.
        !          2806: if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
        !          2807: }'`; fi],[])
        !          2808: if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        !          2809: ])# _LT_AC_SYS_LIBPATH_AIX
        !          2810:
        !          2811:
        !          2812: # _LT_AC_PROG_ECHO_BACKSLASH
        !          2813: # --------------------------
        !          2814: # Add some code to the start of the generated configure script which
        !          2815: # will find an echo command which doesn't interpret backslashes.
        !          2816: AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
        !          2817: [ifdef([AC_DIVERSION_NOTICE],
        !          2818:             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
        !          2819:         [AC_DIVERT_PUSH(NOTICE)])
        !          2820:
        !          2821: # Check that we are running under the correct shell.
        !          2822: SHELL=${CONFIG_SHELL-/bin/sh}
        !          2823:
        !          2824: case X$ECHO in
        !          2825: X*--fallback-echo)
        !          2826:   # Remove one level of quotation (which was required for Make).
        !          2827:   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
        !          2828:   ;;
1.1       maekawa  2829: esac
                   2830:
1.1.1.3 ! ohara    2831: echo=${ECHO-echo}
        !          2832: if test "X[$]1" = X--no-reexec; then
        !          2833:   # Discard the --no-reexec flag, and continue.
        !          2834:   shift
        !          2835: elif test "X[$]1" = X--fallback-echo; then
        !          2836:   # Avoid inline document here, it may be left over
        !          2837:   :
        !          2838: elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
        !          2839:   # Yippee, $echo works!
        !          2840:   :
        !          2841: else
        !          2842:   # Restart under the correct shell.
        !          2843:   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
        !          2844: fi
1.1.1.2   maekawa  2845:
1.1.1.3 ! ohara    2846: if test "X[$]1" = X--fallback-echo; then
        !          2847:   # used as fallback echo
        !          2848:   shift
        !          2849:   cat <<EOF
        !          2850: [$]*
        !          2851: EOF
        !          2852:   exit 0
        !          2853: fi
        !          2854:
        !          2855: # The HP-UX ksh and POSIX shell print the target directory to stdout
        !          2856: # if CDPATH is set.
        !          2857: if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
        !          2858:
        !          2859: if test -z "$ECHO"; then
        !          2860: if test "X${echo_test_string+set}" != Xset; then
        !          2861: # find a string as large as possible, as long as the shell can cope with it
        !          2862:   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
        !          2863:     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
        !          2864:     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
        !          2865:        echo_test_string="`eval $cmd`" &&
        !          2866:        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
        !          2867:     then
        !          2868:       break
        !          2869:     fi
        !          2870:   done
        !          2871: fi
        !          2872:
        !          2873: if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
        !          2874:    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
        !          2875:    test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2876:   :
        !          2877: else
        !          2878:   # The Solaris, AIX, and Digital Unix default echo programs unquote
        !          2879:   # backslashes.  This makes it impossible to quote backslashes using
        !          2880:   #   echo "$something" | sed 's/\\/\\\\/g'
        !          2881:   #
        !          2882:   # So, first we look for a working echo in the user's PATH.
        !          2883:
        !          2884:   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
        !          2885:   for dir in $PATH /usr/ucb; do
        !          2886:     IFS="$lt_save_ifs"
        !          2887:     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
        !          2888:        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
        !          2889:        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
        !          2890:        test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2891:       echo="$dir/echo"
        !          2892:       break
        !          2893:     fi
        !          2894:   done
        !          2895:   IFS="$lt_save_ifs"
        !          2896:
        !          2897:   if test "X$echo" = Xecho; then
        !          2898:     # We didn't find a better echo, so look for alternatives.
        !          2899:     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
        !          2900:        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
        !          2901:        test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2902:       # This shell has a builtin print -r that does the trick.
        !          2903:       echo='print -r'
        !          2904:     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
        !          2905:         test "X$CONFIG_SHELL" != X/bin/ksh; then
        !          2906:       # If we have ksh, try running configure again with it.
        !          2907:       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
        !          2908:       export ORIGINAL_CONFIG_SHELL
        !          2909:       CONFIG_SHELL=/bin/ksh
        !          2910:       export CONFIG_SHELL
        !          2911:       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
        !          2912:     else
        !          2913:       # Try using printf.
        !          2914:       echo='printf %s\n'
        !          2915:       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
        !          2916:         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
        !          2917:         test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2918:        # Cool, printf works
        !          2919:        :
        !          2920:       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
        !          2921:           test "X$echo_testing_string" = 'X\t' &&
        !          2922:           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
        !          2923:           test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2924:        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
        !          2925:        export CONFIG_SHELL
        !          2926:        SHELL="$CONFIG_SHELL"
        !          2927:        export SHELL
        !          2928:        echo="$CONFIG_SHELL [$]0 --fallback-echo"
        !          2929:       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
        !          2930:           test "X$echo_testing_string" = 'X\t' &&
        !          2931:           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
        !          2932:           test "X$echo_testing_string" = "X$echo_test_string"; then
        !          2933:        echo="$CONFIG_SHELL [$]0 --fallback-echo"
        !          2934:       else
        !          2935:        # maybe with a smaller string...
        !          2936:        prev=:
        !          2937:
        !          2938:        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
        !          2939:          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
        !          2940:          then
        !          2941:            break
        !          2942:          fi
        !          2943:          prev="$cmd"
        !          2944:        done
        !          2945:
        !          2946:        if test "$prev" != 'sed 50q "[$]0"'; then
        !          2947:          echo_test_string=`eval $prev`
        !          2948:          export echo_test_string
        !          2949:          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
        !          2950:        else
        !          2951:          # Oops.  We lost completely, so just stick with echo.
        !          2952:          echo=echo
        !          2953:        fi
        !          2954:       fi
        !          2955:     fi
        !          2956:   fi
        !          2957: fi
        !          2958: fi
        !          2959:
        !          2960: # Copy echo and quote the copy suitably for passing to libtool from
        !          2961: # the Makefile, instead of quoting the original, which is used later.
        !          2962: ECHO=$echo
        !          2963: if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
        !          2964:    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
        !          2965: fi
        !          2966:
        !          2967: AC_SUBST(ECHO)
        !          2968: AC_DIVERT_POP
        !          2969: ])# _LT_AC_PROG_ECHO_BACKSLASH
        !          2970:
        !          2971:
        !          2972: # _LT_AC_LOCK
        !          2973: # -----------
        !          2974: AC_DEFUN([_LT_AC_LOCK],
        !          2975: [AC_ARG_ENABLE([libtool-lock],
        !          2976:     [AC_HELP_STRING([--disable-libtool-lock],
        !          2977:        [avoid locking (might break parallel builds)])])
        !          2978: test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1.1.1.2   maekawa  2979:
1.1       maekawa  2980: # Some flags need to be propagated to the compiler or linker for good
                   2981: # libtool support.
1.1.1.3 ! ohara    2982: case $host in
        !          2983: ia64-*-hpux*)
        !          2984:   # Find out which ABI we are using.
        !          2985:   echo 'int i;' > conftest.$ac_ext
        !          2986:   if AC_TRY_EVAL(ac_compile); then
        !          2987:     case `/usr/bin/file conftest.$ac_objext` in
        !          2988:     *ELF-32*)
        !          2989:       HPUX_IA64_MODE="32"
        !          2990:       ;;
        !          2991:     *ELF-64*)
        !          2992:       HPUX_IA64_MODE="64"
        !          2993:       ;;
        !          2994:     esac
        !          2995:   fi
        !          2996:   rm -rf conftest*
        !          2997:   ;;
1.1       maekawa  2998: *-*-irix6*)
                   2999:   # Find out which ABI we are using.
                   3000:   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
                   3001:   if AC_TRY_EVAL(ac_compile); then
1.1.1.3 ! ohara    3002:     case `/usr/bin/file conftest.$ac_objext` in
1.1       maekawa  3003:     *32-bit*)
                   3004:       LD="${LD-ld} -32"
                   3005:       ;;
                   3006:     *N32*)
                   3007:       LD="${LD-ld} -n32"
                   3008:       ;;
                   3009:     *64-bit*)
                   3010:       LD="${LD-ld} -64"
                   3011:       ;;
                   3012:     esac
                   3013:   fi
                   3014:   rm -rf conftest*
                   3015:   ;;
                   3016:
                   3017: *-*-sco3.2v5*)
                   3018:   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
                   3019:   SAVE_CFLAGS="$CFLAGS"
                   3020:   CFLAGS="$CFLAGS -belf"
                   3021:   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1.1.1.3 ! ohara    3022:     [AC_LANG_PUSH(C)
1.1.1.2   maekawa  3023:      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1.1.1.3 ! ohara    3024:      AC_LANG_POP])
1.1       maekawa  3025:   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
                   3026:     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
                   3027:     CFLAGS="$SAVE_CFLAGS"
                   3028:   fi
                   3029:   ;;
                   3030: ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1.1.1.3 ! ohara    3031: [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1.1       maekawa  3032:   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
                   3033:   AC_CHECK_TOOL(AS, as, false)
                   3034:   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1.1.1.2   maekawa  3035:
                   3036:   # recent cygwin and mingw systems supply a stub DllMain which the user
                   3037:   # can override, but on older systems we have to supply one
                   3038:   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
                   3039:     [AC_TRY_LINK([],
                   3040:       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
                   3041:       DllMain (0, 0, 0);],
                   3042:       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
                   3043:
1.1.1.3 ! ohara    3044:   case $host/$CC in
1.1.1.2   maekawa  3045:   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
                   3046:     # old mingw systems require "-dll" to link a DLL, while more recent ones
                   3047:     # require "-mdll"
                   3048:     SAVE_CFLAGS="$CFLAGS"
                   3049:     CFLAGS="$CFLAGS -mdll"
                   3050:     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
                   3051:       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
                   3052:     CFLAGS="$SAVE_CFLAGS" ;;
1.1.1.3 ! ohara    3053:   *-*-cygwin* | *-*-pw32*)
1.1.1.2   maekawa  3054:     # cygwin systems need to pass --dll to the linker, and not link
                   3055:     # crt.o which will require a WinMain@16 definition.
                   3056:     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
                   3057:   esac
1.1       maekawa  3058:   ;;
1.1.1.2   maekawa  3059:   ])
1.1       maekawa  3060: esac
                   3061:
1.1.1.3 ! ohara    3062: need_locks="$enable_libtool_lock"
1.1       maekawa  3063:
1.1.1.3 ! ohara    3064: ])# _LT_AC_LOCK
1.1       maekawa  3065:
                   3066:
1.1.1.3 ! ohara    3067: # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
        !          3068: #              [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
        !          3069: # ----------------------------------------------------------------
        !          3070: # Check whether the given compiler option works
        !          3071: AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
        !          3072: [AC_CACHE_CHECK([$1], [$2],
        !          3073:   [$2=no
        !          3074:   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
        !          3075:    save_CFLAGS="$CFLAGS"
        !          3076:    CFLAGS="$CFLAGS $3"
        !          3077:    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
        !          3078:    if (eval $ac_compile 2>conftest.err) && test -s $ac_outfile; then
        !          3079:      # The compiler can only warn and ignore the option if not recognized
        !          3080:      # So say no if there are warnings mentioning the option
        !          3081:      cat conftest.err 1>&AS_MESSAGE_LOG_FD
        !          3082:      $2=yes
        !          3083:      for lt_i in $3; do
        !          3084:        if grep -- $lt_i conftest.err >/dev/null; then
        !          3085:          $2=no
        !          3086:        fi
        !          3087:      done
        !          3088:    fi
        !          3089:    $rm conftest*
        !          3090:    CFLAGS="$save_CFLAGS"
1.1       maekawa  3091: ])
                   3092:
1.1.1.3 ! ohara    3093: if test x"[$]$2" = xyes; then
        !          3094:     ifelse([$5], , :, [$5])
        !          3095: else
        !          3096:     ifelse([$6], , :, [$6])
        !          3097: fi
        !          3098: ])# AC_LIBTOOL_COMPILER_OPTION
        !          3099:
        !          3100:
        !          3101: # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
        !          3102: #                          [ACTION-SUCCESS], [ACTION-FAILURE])
        !          3103: # ------------------------------------------------------------
        !          3104: # Check whether the given compiler option works
        !          3105: AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
        !          3106: [AC_CACHE_CHECK([$1], [$2],
        !          3107:   [$2=no
        !          3108:    save_LDFLAGS="$LDFLAGS"
        !          3109:    LDFLAGS="$LDFLAGS $3"
        !          3110:    echo "$lt_simple_link_test_code" > conftest.$ac_ext
        !          3111:    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
        !          3112:      # The compiler can only warn and ignore the option if not recognized
        !          3113:      # So say no if there are warnings
        !          3114:      if test -s conftest.err; then
        !          3115:        # Append any errors to the config.log.
        !          3116:        cat conftest.err 1>&AS_MESSAGE_LOG_FD
        !          3117:      else
        !          3118:        $2=yes
        !          3119:      fi
        !          3120:    fi
        !          3121:    $rm conftest*
        !          3122:    LDFLAGS="$save_LDFLAGS"
1.1       maekawa  3123: ])
                   3124:
1.1.1.3 ! ohara    3125: if test x"[$]$2" = xyes; then
        !          3126:     ifelse([$4], , :, [$4])
        !          3127: else
        !          3128:     ifelse([$5], , :, [$5])
        !          3129: fi
        !          3130: ])# AC_LIBTOOL_LINKER_OPTION
1.1       maekawa  3131:
1.1.1.2   maekawa  3132:
1.1.1.3 ! ohara    3133: # AC_LIBTOOL_SYS_MAX_CMD_LEN
        !          3134: # --------------------------
        !          3135: AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
        !          3136: [# find the maximum length of command line arguments
        !          3137: AC_MSG_CHECKING([the maximum length of command line arguments])
        !          3138: AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
        !          3139:   i=0
        !          3140:   testring="ABCD"
        !          3141:
        !          3142:   case $host_os in
        !          3143:   msdosdjgpp*)
        !          3144:     # On DJGPP, this test can blow up pretty badly due to problems in libc
        !          3145:     # (any single argument exceeding 2000 bytes causes a buffer overrun
        !          3146:     # during glob expansion).  Even if it were fixed, the result of this
        !          3147:     # check would be larger than it should be.
        !          3148:     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
        !          3149:     ;;
1.1.1.2   maekawa  3150:
1.1.1.3 ! ohara    3151:   gnu*)
        !          3152:     # Under GNU Hurd, this test is not required because there is
        !          3153:     # no limit to the length of command line arguments.
        !          3154:     # Libtool will interpret -1 as no limit whatsoever
        !          3155:     lt_cv_sys_max_cmd_len=-1;
        !          3156:     ;;
1.1.1.2   maekawa  3157:
1.1.1.3 ! ohara    3158:   *)
        !          3159:     # If test is not a shell built-in, we'll probably end up computing a
        !          3160:     # maximum length that is only half of the actual maximum length, but
        !          3161:     # we can't tell.
        !          3162:     while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
        !          3163:               = "XX$testring") >/dev/null 2>&1 &&
        !          3164:            new_result=`expr "X$testring" : ".*" 2>&1` &&
        !          3165:            lt_cv_sys_max_cmd_len=$new_result &&
        !          3166:            test $i != 17 # 1/2 MB should be enough
        !          3167:     do
        !          3168:       i=`expr $i + 1`
        !          3169:       testring=$testring$testring
        !          3170:     done
        !          3171:     testring=
        !          3172:     # add a significant safety factor because C++ compilers can tack on massive
        !          3173:     # amounts of additional arguments before passing them to the linker.  1/4
        !          3174:     # should be good.
        !          3175:     len=`expr $lt_cv_sys_max_cmd_len \/ 4`
        !          3176:     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
        !          3177:     ;;
        !          3178:   esac
        !          3179: ])
        !          3180: if test -n $lt_cv_sys_max_cmd_len ; then
        !          3181:   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1.1.1.2   maekawa  3182: else
1.1.1.3 ! ohara    3183:   AC_MSG_RESULT(none)
1.1.1.2   maekawa  3184: fi
1.1.1.3 ! ohara    3185: ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1.1.1.2   maekawa  3186:
                   3187:
1.1.1.3 ! ohara    3188: # _LT_AC_CHECK_DLFCN
        !          3189: # --------------------
        !          3190: AC_DEFUN([_LT_AC_CHECK_DLFCN],
        !          3191: [AC_CHECK_HEADERS(dlfcn.h)dnl
        !          3192: ])# _LT_AC_CHECK_DLFCN
        !          3193:
        !          3194:
        !          3195: # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
        !          3196: #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
        !          3197: # ------------------------------------------------------------------
        !          3198: AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
        !          3199: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
        !          3200: if test "$cross_compiling" = yes; then :
        !          3201:   [$4]
        !          3202: else
        !          3203:   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
        !          3204:   lt_status=$lt_dlunknown
        !          3205:   cat > conftest.$ac_ext <<EOF
        !          3206: [#line __oline__ "configure"
        !          3207: #include "confdefs.h"
        !          3208:
        !          3209: #if HAVE_DLFCN_H
        !          3210: #include <dlfcn.h>
        !          3211: #endif
        !          3212:
        !          3213: #include <stdio.h>
        !          3214:
        !          3215: #ifdef RTLD_GLOBAL
        !          3216: #  define LT_DLGLOBAL          RTLD_GLOBAL
        !          3217: #else
        !          3218: #  ifdef DL_GLOBAL
        !          3219: #    define LT_DLGLOBAL                DL_GLOBAL
        !          3220: #  else
        !          3221: #    define LT_DLGLOBAL                0
        !          3222: #  endif
        !          3223: #endif
        !          3224:
        !          3225: /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
        !          3226:    find out it does not work in some platform. */
        !          3227: #ifndef LT_DLLAZY_OR_NOW
        !          3228: #  ifdef RTLD_LAZY
        !          3229: #    define LT_DLLAZY_OR_NOW           RTLD_LAZY
        !          3230: #  else
        !          3231: #    ifdef DL_LAZY
        !          3232: #      define LT_DLLAZY_OR_NOW         DL_LAZY
        !          3233: #    else
        !          3234: #      ifdef RTLD_NOW
        !          3235: #        define LT_DLLAZY_OR_NOW       RTLD_NOW
        !          3236: #      else
        !          3237: #        ifdef DL_NOW
        !          3238: #          define LT_DLLAZY_OR_NOW     DL_NOW
        !          3239: #        else
        !          3240: #          define LT_DLLAZY_OR_NOW     0
        !          3241: #        endif
        !          3242: #      endif
        !          3243: #    endif
        !          3244: #  endif
        !          3245: #endif
        !          3246:
        !          3247: #ifdef __cplusplus
        !          3248: extern "C" void exit (int);
        !          3249: #endif
        !          3250:
        !          3251: void fnord() { int i=42;}
        !          3252: int main ()
        !          3253: {
        !          3254:   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
        !          3255:   int status = $lt_dlunknown;
        !          3256:
        !          3257:   if (self)
        !          3258:     {
        !          3259:       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
        !          3260:       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
        !          3261:       /* dlclose (self); */
        !          3262:     }
        !          3263:
        !          3264:     exit (status);
        !          3265: }]
        !          3266: EOF
        !          3267:   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
        !          3268:     (./conftest; exit; ) 2>/dev/null
        !          3269:     lt_status=$?
        !          3270:     case x$lt_status in
        !          3271:       x$lt_dlno_uscore) $1 ;;
        !          3272:       x$lt_dlneed_uscore) $2 ;;
        !          3273:       x$lt_unknown|x*) $3 ;;
        !          3274:     esac
        !          3275:   else :
        !          3276:     # compilation failed
        !          3277:     $3
1.1.1.2   maekawa  3278:   fi
                   3279: fi
1.1.1.3 ! ohara    3280: rm -fr conftest*
        !          3281: ])# _LT_AC_TRY_DLOPEN_SELF
1.1.1.2   maekawa  3282:
                   3283:
1.1.1.3 ! ohara    3284: # AC_LIBTOOL_DLOPEN_SELF
        !          3285: # -------------------
        !          3286: AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
        !          3287: [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
        !          3288: if test "x$enable_dlopen" != xyes; then
        !          3289:   enable_dlopen=unknown
        !          3290:   enable_dlopen_self=unknown
        !          3291:   enable_dlopen_self_static=unknown
        !          3292: else
        !          3293:   lt_cv_dlopen=no
        !          3294:   lt_cv_dlopen_libs=
        !          3295:
        !          3296:   case $host_os in
        !          3297:   beos*)
        !          3298:     lt_cv_dlopen="load_add_on"
        !          3299:     lt_cv_dlopen_libs=
        !          3300:     lt_cv_dlopen_self=yes
        !          3301:     ;;
        !          3302:
        !          3303:   cygwin* | mingw* | pw32*)
        !          3304:     lt_cv_dlopen="LoadLibrary"
        !          3305:     lt_cv_dlopen_libs=
        !          3306:    ;;
        !          3307:
        !          3308:   *)
        !          3309:     AC_CHECK_FUNC([shl_load],
        !          3310:          [lt_cv_dlopen="shl_load"],
        !          3311:       [AC_CHECK_LIB([dld], [shl_load],
        !          3312:            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
        !          3313:        [AC_CHECK_FUNC([dlopen],
        !          3314:              [lt_cv_dlopen="dlopen"],
        !          3315:          [AC_CHECK_LIB([dl], [dlopen],
        !          3316:                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
        !          3317:            [AC_CHECK_LIB([svld], [dlopen],
        !          3318:                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
        !          3319:              [AC_CHECK_LIB([dld], [dld_link],
        !          3320:                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
        !          3321:              ])
        !          3322:            ])
        !          3323:          ])
        !          3324:        ])
        !          3325:       ])
        !          3326:     ;;
        !          3327:   esac
        !          3328:
        !          3329:   if test "x$lt_cv_dlopen" != xno; then
        !          3330:     enable_dlopen=yes
        !          3331:   else
        !          3332:     enable_dlopen=no
        !          3333:   fi
        !          3334:
        !          3335:   case $lt_cv_dlopen in
        !          3336:   dlopen)
        !          3337:     save_CPPFLAGS="$CPPFLAGS"
        !          3338:     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
        !          3339:
        !          3340:     save_LDFLAGS="$LDFLAGS"
        !          3341:     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
        !          3342:
        !          3343:     save_LIBS="$LIBS"
        !          3344:     LIBS="$lt_cv_dlopen_libs $LIBS"
        !          3345:
        !          3346:     AC_CACHE_CHECK([whether a program can dlopen itself],
        !          3347:          lt_cv_dlopen_self, [dnl
        !          3348:          _LT_AC_TRY_DLOPEN_SELF(
        !          3349:            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
        !          3350:            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
        !          3351:     ])
        !          3352:
        !          3353:     if test "x$lt_cv_dlopen_self" = xyes; then
        !          3354:       LDFLAGS="$LDFLAGS $link_static_flag"
        !          3355:       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
        !          3356:          lt_cv_dlopen_self_static, [dnl
        !          3357:          _LT_AC_TRY_DLOPEN_SELF(
        !          3358:            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
        !          3359:            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
        !          3360:       ])
        !          3361:     fi
        !          3362:
        !          3363:     CPPFLAGS="$save_CPPFLAGS"
        !          3364:     LDFLAGS="$save_LDFLAGS"
        !          3365:     LIBS="$save_LIBS"
        !          3366:     ;;
        !          3367:   esac
        !          3368:
        !          3369:   case $lt_cv_dlopen_self in
        !          3370:   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
        !          3371:   *) enable_dlopen_self=unknown ;;
        !          3372:   esac
        !          3373:
        !          3374:   case $lt_cv_dlopen_self_static in
        !          3375:   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
        !          3376:   *) enable_dlopen_self_static=unknown ;;
        !          3377:   esac
        !          3378: fi
        !          3379: ])# AC_LIBTOOL_DLOPEN_SELF
        !          3380:
        !          3381:
        !          3382: # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
        !          3383: # ---------------------------------
        !          3384: # Check to see if options -c and -o are simultaneously supported by compiler
        !          3385: AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
        !          3386: [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
        !          3387: AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
        !          3388:   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
        !          3389:   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
        !          3390:    $rm -r conftest 2>/dev/null
        !          3391:    mkdir conftest
        !          3392:    cd conftest
        !          3393:    mkdir out
        !          3394:    ifelse([$1],[],[save_CFLAGS="$CFLAGS"
        !          3395:                   CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
        !          3396:          [$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
        !          3397:                   CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
        !          3398:          [$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
        !          3399:                   GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
        !          3400:    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
        !          3401:
        !          3402:    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
        !          3403:    # that will create temporary files in the current directory regardless of
        !          3404:    # the output directory.  Thus, making CWD read-only will cause this test
        !          3405:    # to fail, enabling locking or at least warning the user not to do parallel
        !          3406:    # builds.
        !          3407:    chmod -w .
        !          3408:
        !          3409:    if (eval $ac_compile 2>out/conftest.err) && test -s out/conftest2.$ac_objext
        !          3410:    then
        !          3411:      # The compiler can only warn and ignore the option if not recognized
        !          3412:      # So say no if there are warnings
        !          3413:      if test -s out/conftest.err; then
        !          3414:        # Append any errors to the config.log.
        !          3415:        cat out/conftest.err 1>&AS_MESSAGE_LOG_FD
        !          3416:      else
        !          3417:        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
        !          3418:      fi
        !          3419:    fi
        !          3420:    ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
        !          3421:          [$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
        !          3422:          [$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
        !          3423:    chmod u+w .
        !          3424:    $rm conftest* out/*
        !          3425:    rmdir out
        !          3426:    cd ..
        !          3427:    rmdir conftest
        !          3428:    $rm conftest*
        !          3429: ])
        !          3430: ])# AC_LIBTOOL_PROG_CC_C_O
        !          3431:
        !          3432:
        !          3433: # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
        !          3434: # -----------------------------------------
        !          3435: # Check to see if we can do hard links to lock some files if needed
        !          3436: AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
        !          3437: [AC_REQUIRE([_LT_AC_LOCK])dnl
        !          3438:
        !          3439: hard_links="nottested"
        !          3440: if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
        !          3441:   # do not overwrite the value of need_locks provided by the user
        !          3442:   AC_MSG_CHECKING([if we can lock with hard links])
        !          3443:   hard_links=yes
        !          3444:   $rm conftest*
        !          3445:   ln conftest.a conftest.b 2>/dev/null && hard_links=no
        !          3446:   touch conftest.a
        !          3447:   ln conftest.a conftest.b 2>&5 || hard_links=no
        !          3448:   ln conftest.a conftest.b 2>/dev/null && hard_links=no
        !          3449:   AC_MSG_RESULT([$hard_links])
        !          3450:   if test "$hard_links" = no; then
        !          3451:     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
        !          3452:     need_locks=warn
        !          3453:   fi
        !          3454: else
        !          3455:   need_locks=no
        !          3456: fi
        !          3457: ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
        !          3458:
        !          3459:
        !          3460: # AC_LIBTOOL_OBJDIR
        !          3461: # -----------------
        !          3462: AC_DEFUN([AC_LIBTOOL_OBJDIR],
        !          3463: [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
        !          3464: [rm -f .libs 2>/dev/null
        !          3465: mkdir .libs 2>/dev/null
        !          3466: if test -d .libs; then
        !          3467:   lt_cv_objdir=.libs
        !          3468: else
        !          3469:   # MS-DOS does not allow filenames that begin with a dot.
        !          3470:   lt_cv_objdir=_libs
        !          3471: fi
        !          3472: rmdir .libs 2>/dev/null])
        !          3473: objdir=$lt_cv_objdir
        !          3474: ])# AC_LIBTOOL_OBJDIR
        !          3475:
        !          3476:
        !          3477: # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
        !          3478: # ----------------------------------------------
        !          3479: # Check hardcoding attributes.
        !          3480: AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
        !          3481: [AC_MSG_CHECKING([how to hardcode library paths into programs])
        !          3482: _LT_AC_TAGVAR(hardcode_action, $1)=
        !          3483: if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
        !          3484:    test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
        !          3485:
        !          3486:   # We can hardcode non-existant directories.
        !          3487:   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
        !          3488:      # If the only mechanism to avoid hardcoding is shlibpath_var, we
        !          3489:      # have to relink, otherwise we might link with an installed library
        !          3490:      # when we should be linking with a yet-to-be-installed one
        !          3491:      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
        !          3492:      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
        !          3493:     # Linking always hardcodes the temporary library directory.
        !          3494:     _LT_AC_TAGVAR(hardcode_action, $1)=relink
        !          3495:   else
        !          3496:     # We can link without hardcoding, and we can hardcode nonexisting dirs.
        !          3497:     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
        !          3498:   fi
        !          3499: else
        !          3500:   # We cannot hardcode anything, or else we can only hardcode existing
        !          3501:   # directories.
        !          3502:   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
        !          3503: fi
        !          3504: AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
        !          3505:
        !          3506: if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
        !          3507:   # Fast installation is not supported
        !          3508:   enable_fast_install=no
        !          3509: elif test "$shlibpath_overrides_runpath" = yes ||
        !          3510:      test "$enable_shared" = no; then
        !          3511:   # Fast installation is not necessary
        !          3512:   enable_fast_install=needless
        !          3513: fi
        !          3514: ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
        !          3515:
        !          3516:
        !          3517: # AC_LIBTOOL_SYS_LIB_STRIP
        !          3518: # ------------------------
        !          3519: AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
        !          3520: [striplib=
        !          3521: old_striplib=
        !          3522: AC_MSG_CHECKING([whether stripping libraries is possible])
        !          3523: if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
        !          3524:   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
        !          3525:   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
        !          3526:   AC_MSG_RESULT([yes])
        !          3527: else
        !          3528:   AC_MSG_RESULT([no])
        !          3529: fi
        !          3530: ])# AC_LIBTOOL_SYS_LIB_STRIP
        !          3531:
        !          3532:
        !          3533: # AC_LIBTOOL_SYS_DYNAMIC_LINKER
        !          3534: # -----------------------------
        !          3535: # PORTME Fill in your ld.so characteristics
        !          3536: AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
        !          3537: [AC_MSG_CHECKING([dynamic linker characteristics])
        !          3538: library_names_spec=
        !          3539: libname_spec='lib$name'
        !          3540: soname_spec=
        !          3541: postinstall_cmds=
        !          3542: postuninstall_cmds=
        !          3543: finish_cmds=
        !          3544: finish_eval=
        !          3545: shlibpath_var=
        !          3546: shlibpath_overrides_runpath=unknown
        !          3547: version_type=none
        !          3548: dynamic_linker="$host_os ld.so"
        !          3549: sys_lib_dlsearch_path_spec="/lib /usr/lib"
        !          3550: sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
        !          3551: need_lib_prefix=unknown
        !          3552: hardcode_into_libs=no
        !          3553:
        !          3554: # when you set need_version to no, make sure it does not cause -set_version
        !          3555: # flags to be left without arguments
        !          3556: need_version=unknown
        !          3557:
        !          3558: case $host_os in
        !          3559: aix3*)
        !          3560:   version_type=linux
        !          3561:   library_names_spec='${libname}${release}.so$versuffix $libname.a'
        !          3562:   shlibpath_var=LIBPATH
        !          3563:
        !          3564:   # AIX 3 has no versioning support, so we append a major version to the name.
        !          3565:   soname_spec='${libname}${release}.so$major'
        !          3566:   ;;
        !          3567:
        !          3568: aix4* | aix5*)
        !          3569:   version_type=linux
        !          3570:   if test "$host_cpu" = ia64; then
        !          3571:     # AIX 5 supports IA64
        !          3572:     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
        !          3573:     shlibpath_var=LD_LIBRARY_PATH
        !          3574:   else
        !          3575:     # With GCC up to 2.95.x, collect2 would create an import file
        !          3576:     # for dependence libraries.  The import file would start with
        !          3577:     # the line `#! .'.  This would cause the generated library to
        !          3578:     # depend on `.', always an invalid library.  This was fixed in
        !          3579:     # development snapshots of GCC prior to 3.0.
        !          3580:     case $host_os in
        !          3581:       aix4 | aix4.[[01]] | aix4.[[01]].*)
        !          3582:       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
        !          3583:           echo ' yes '
        !          3584:           echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
        !          3585:        :
        !          3586:       else
        !          3587:        can_build_shared=no
        !          3588:       fi
        !          3589:       ;;
        !          3590:     esac
        !          3591:     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
        !          3592:     # soname into executable. Probably we can add versioning support to
        !          3593:     # collect2, so additional links can be useful in future.
        !          3594:     if test "$aix_use_runtimelinking" = yes; then
        !          3595:       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
        !          3596:       # instead of lib<name>.a to let people know that these are not
        !          3597:       # typical AIX shared libraries.
        !          3598:       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3599:     else
        !          3600:       # We preserve .a as extension for shared libraries through AIX4.2
        !          3601:       # and later when we are not doing run time linking.
        !          3602:       library_names_spec='${libname}${release}.a $libname.a'
        !          3603:       soname_spec='${libname}${release}.so$major'
        !          3604:     fi
        !          3605:     shlibpath_var=LIBPATH
        !          3606:   fi
        !          3607:   ;;
        !          3608:
        !          3609: amigaos*)
        !          3610:   library_names_spec='$libname.ixlibrary $libname.a'
        !          3611:   # Create ${libname}_ixlibrary.a entries in /sys/libs.
        !          3612:   finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
        !          3613:   ;;
        !          3614:
        !          3615: beos*)
        !          3616:   library_names_spec='${libname}.so'
        !          3617:   dynamic_linker="$host_os ld.so"
        !          3618:   shlibpath_var=LIBRARY_PATH
        !          3619:   ;;
        !          3620:
        !          3621: bsdi4*)
        !          3622:   version_type=linux
        !          3623:   need_version=no
        !          3624:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3625:   soname_spec='${libname}${release}.so$major'
        !          3626:   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
        !          3627:   shlibpath_var=LD_LIBRARY_PATH
        !          3628:   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
        !          3629:   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
        !          3630:   # the default ld.so.conf also contains /usr/contrib/lib and
        !          3631:   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
        !          3632:   # libtool to hard-code these into programs
        !          3633:   ;;
        !          3634:
        !          3635: cygwin* | mingw* | pw32*)
        !          3636:   version_type=windows
        !          3637:   need_version=no
        !          3638:   need_lib_prefix=no
        !          3639:   case $GCC,$host_os in
        !          3640:   yes,cygwin*)
        !          3641:     library_names_spec='$libname.dll.a'
        !          3642:     sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
        !          3643:     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
        !          3644:     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
        !          3645:       dldir=$destdir/`dirname \$dlpath`~
        !          3646:       test -d \$dldir || mkdir -p \$dldir~
        !          3647:       $install_prog .libs/$dlname \$dldir/$dlname'
        !          3648:     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
        !          3649:       dlpath=$dir/\$dldll~
        !          3650:        $rm \$dlpath'
        !          3651:     ;;
        !          3652:   yes,mingw*)
        !          3653:     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
        !          3654:     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://"`
        !          3655:     if echo "$sys_lib_search_path_spec" | [egrep ';[C-Z]:/' >/dev/null]; then
        !          3656:       # It is most probably a Windows format PATH printed by
        !          3657:       # mingw gcc, but we are running on Cygwin. Gcc prints its search
        !          3658:       # path with ; separators, and with drive letters. We can handle the
        !          3659:       # drive letters (cygwin fileutils understands them), so leave them,
        !          3660:       # especially as we might pass files found there to a mingw objdump,
        !          3661:       # which wouldn't understand a cygwinified path. Ahh.
        !          3662:       sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed -e 's/;/ /g'`
        !          3663:     else
        !          3664:       sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | sed  -e "s/$PATH_SEPARATOR/ /g"`
        !          3665:     fi
        !          3666:     ;;
        !          3667:   yes,pw32*)
        !          3668:     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
        !          3669:     ;;
        !          3670:   *)
        !          3671:     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
        !          3672:     ;;
        !          3673:   esac
        !          3674:   dynamic_linker='Win32 ld.exe'
        !          3675:   # FIXME: first we should search . and the directory the executable is in
        !          3676:   shlibpath_var=PATH
        !          3677:   ;;
        !          3678:
        !          3679: darwin* | rhapsody*)
        !          3680:   dynamic_linker="$host_os dyld"
        !          3681:   version_type=darwin
        !          3682:   need_lib_prefix=no
        !          3683:   need_version=no
        !          3684:   # FIXME: Relying on posixy $() will cause problems for
        !          3685:   #        cross-compilation, but unfortunately the echo tests do not
        !          3686:   #        yet detect zsh echo's removal of \ escapes.
        !          3687:   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
        !          3688:   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
        !          3689:   shlibpath_overrides_runpath=yes
        !          3690:   shlibpath_var=DYLD_LIBRARY_PATH
        !          3691:   ;;
        !          3692:
        !          3693: dgux*)
        !          3694:   version_type=linux
        !          3695:   need_lib_prefix=no
        !          3696:   need_version=no
        !          3697:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3698:   soname_spec='${libname}${release}.so$major'
        !          3699:   shlibpath_var=LD_LIBRARY_PATH
        !          3700:   ;;
        !          3701:
        !          3702: freebsd1*)
        !          3703:   dynamic_linker=no
        !          3704:   ;;
        !          3705:
        !          3706: freebsd*)
        !          3707:   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
        !          3708:   version_type=freebsd-$objformat
        !          3709:   case $version_type in
        !          3710:     freebsd-elf*)
        !          3711:       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
        !          3712:       need_version=no
        !          3713:       need_lib_prefix=no
        !          3714:       ;;
        !          3715:     freebsd-*)
        !          3716:       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
        !          3717:       need_version=yes
        !          3718:       ;;
        !          3719:   esac
        !          3720:   shlibpath_var=LD_LIBRARY_PATH
        !          3721:   case $host_os in
        !          3722:   freebsd2*)
        !          3723:     shlibpath_overrides_runpath=yes
        !          3724:     ;;
        !          3725:   freebsd3.[01]* | freebsdelf3.[01]*)
        !          3726:     shlibpath_overrides_runpath=yes
        !          3727:     hardcode_into_libs=yes
        !          3728:     ;;
        !          3729:   *) # from 3.2 on
        !          3730:     shlibpath_overrides_runpath=no
        !          3731:     hardcode_into_libs=yes
        !          3732:     ;;
        !          3733:   esac
        !          3734:   ;;
        !          3735:
        !          3736: gnu*)
        !          3737:   version_type=linux
        !          3738:   need_lib_prefix=no
        !          3739:   need_version=no
        !          3740:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
        !          3741:   soname_spec='${libname}${release}.so$major'
        !          3742:   shlibpath_var=LD_LIBRARY_PATH
        !          3743:   hardcode_into_libs=yes
        !          3744:   ;;
        !          3745:
        !          3746: hpux9* | hpux10* | hpux11*)
        !          3747:   # Give a soname corresponding to the major version so that dld.sl refuses to
        !          3748:   # link against other versions.
        !          3749:   version_type=sunos
        !          3750:   need_lib_prefix=no
        !          3751:   need_version=no
        !          3752:   if test "$host_cpu" = ia64; then
        !          3753:     hardcode_into_libs=yes
        !          3754:     dynamic_linker="$host_os dld.so"
        !          3755:     shlibpath_var=LD_LIBRARY_PATH
        !          3756:     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
        !          3757:     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3758:     soname_spec='${libname}${release}.so$major'
        !          3759:     if test "X$HPUX_IA64_MODE" = X32; then
        !          3760:       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
        !          3761:     else
        !          3762:       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
        !          3763:     fi
        !          3764:     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
        !          3765:   else
        !          3766:     dynamic_linker="$host_os dld.sl"
        !          3767:     shlibpath_var=SHLIB_PATH
        !          3768:     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
        !          3769:     library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
        !          3770:     soname_spec='${libname}${release}.sl$major'
        !          3771:   fi
        !          3772:   # HP-UX runs *really* slowly unless shared libraries are mode 555.
        !          3773:   postinstall_cmds='chmod 555 $lib'
        !          3774:   ;;
        !          3775:
        !          3776: irix5* | irix6*)
        !          3777:   version_type=irix
        !          3778:   need_lib_prefix=no
        !          3779:   need_version=no
        !          3780:   soname_spec='${libname}${release}.so$major'
        !          3781:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
        !          3782:   case $host_os in
        !          3783:   irix5*)
        !          3784:     libsuff= shlibsuff=
        !          3785:     ;;
        !          3786:   *)
        !          3787:     case $LD in # libtool.m4 will add one of these switches to LD
        !          3788:     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
        !          3789:     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
        !          3790:     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
        !          3791:     *) libsuff= shlibsuff= libmagic=never-match;;
        !          3792:     esac
        !          3793:     ;;
        !          3794:   esac
        !          3795:   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
        !          3796:   shlibpath_overrides_runpath=no
        !          3797:   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
        !          3798:   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
        !          3799:   ;;
        !          3800:
        !          3801: # No shared lib support for Linux oldld, aout, or coff.
        !          3802: linux*oldld* | linux*aout* | linux*coff*)
        !          3803:   dynamic_linker=no
        !          3804:   ;;
        !          3805:
        !          3806: # This must be Linux ELF.
        !          3807: linux*)
        !          3808:   version_type=linux
        !          3809:   need_lib_prefix=no
        !          3810:   need_version=no
        !          3811:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3812:   soname_spec='${libname}${release}.so$major'
        !          3813:   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
        !          3814:   shlibpath_var=LD_LIBRARY_PATH
        !          3815:   shlibpath_overrides_runpath=no
        !          3816:   # This implies no fast_install, which is unacceptable.
        !          3817:   # Some rework will be needed to allow for fast_install
        !          3818:   # before this can be enabled.
        !          3819:   hardcode_into_libs=yes
        !          3820:
        !          3821:   # We used to test for /lib/ld.so.1 and disable shared libraries on
        !          3822:   # powerpc, because MkLinux only supported shared libraries with the
        !          3823:   # GNU dynamic linker.  Since this was broken with cross compilers,
        !          3824:   # most powerpc-linux boxes support dynamic linking these days and
        !          3825:   # people can always --disable-shared, the test was removed, and we
        !          3826:   # assume the GNU/Linux dynamic linker is in use.
        !          3827:   dynamic_linker='GNU/Linux ld.so'
        !          3828:   ;;
        !          3829:
        !          3830: netbsd*)
        !          3831:   version_type=sunos
        !          3832:   need_lib_prefix=no
        !          3833:   need_version=no
        !          3834:   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
        !          3835:     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
        !          3836:     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
        !          3837:     dynamic_linker='NetBSD (a.out) ld.so'
        !          3838:   else
        !          3839:     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
        !          3840:     soname_spec='${libname}${release}.so$major'
        !          3841:     dynamic_linker='NetBSD ld.elf_so'
        !          3842:   fi
        !          3843:   shlibpath_var=LD_LIBRARY_PATH
        !          3844:   shlibpath_overrides_runpath=yes
        !          3845:   hardcode_into_libs=yes
        !          3846:   ;;
        !          3847:
        !          3848: newsos6)
        !          3849:   version_type=linux
        !          3850:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3851:   shlibpath_var=LD_LIBRARY_PATH
        !          3852:   shlibpath_overrides_runpath=yes
        !          3853:   ;;
        !          3854:
        !          3855: nto-qnx)
        !          3856:   version_type=linux
        !          3857:   need_lib_prefix=no
        !          3858:   need_version=no
        !          3859:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3860:   soname_spec='${libname}${release}.so$major'
        !          3861:   shlibpath_var=LD_LIBRARY_PATH
        !          3862:   shlibpath_overrides_runpath=yes
        !          3863:   ;;
        !          3864:
        !          3865: openbsd*)
        !          3866:   version_type=sunos
        !          3867:   need_lib_prefix=no
        !          3868:   need_version=no
        !          3869:   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
        !          3870:   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
        !          3871:   shlibpath_var=LD_LIBRARY_PATH
        !          3872:   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
        !          3873:     case $host_os in
        !          3874:       openbsd2.[[89]] | openbsd2.[[89]].*)
        !          3875:        shlibpath_overrides_runpath=no
        !          3876:        ;;
        !          3877:       *)
        !          3878:        shlibpath_overrides_runpath=yes
        !          3879:        ;;
        !          3880:       esac
        !          3881:   else
        !          3882:     shlibpath_overrides_runpath=yes
        !          3883:   fi
        !          3884:   ;;
        !          3885:
        !          3886: os2*)
        !          3887:   libname_spec='$name'
        !          3888:   need_lib_prefix=no
        !          3889:   library_names_spec='$libname.dll $libname.a'
        !          3890:   dynamic_linker='OS/2 ld.exe'
        !          3891:   shlibpath_var=LIBPATH
        !          3892:   ;;
        !          3893:
        !          3894: osf3* | osf4* | osf5*)
        !          3895:   version_type=osf
        !          3896:   need_lib_prefix=no
        !          3897:   need_version=no
        !          3898:   soname_spec='${libname}${release}.so'
        !          3899:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
        !          3900:   shlibpath_var=LD_LIBRARY_PATH
        !          3901:   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
        !          3902:   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
        !          3903:   ;;
        !          3904:
        !          3905: sco3.2v5*)
        !          3906:   version_type=osf
        !          3907:   soname_spec='${libname}${release}.so$major'
        !          3908:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3909:   shlibpath_var=LD_LIBRARY_PATH
        !          3910:   ;;
        !          3911:
        !          3912: solaris*)
        !          3913:   version_type=linux
        !          3914:   need_lib_prefix=no
        !          3915:   need_version=no
        !          3916:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3917:   soname_spec='${libname}${release}.so$major'
        !          3918:   shlibpath_var=LD_LIBRARY_PATH
        !          3919:   shlibpath_overrides_runpath=yes
        !          3920:   hardcode_into_libs=yes
        !          3921:   # ldd complains unless libraries are executable
        !          3922:   postinstall_cmds='chmod +x $lib'
        !          3923:   ;;
        !          3924:
        !          3925: sunos4*)
        !          3926:   version_type=sunos
        !          3927:   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
        !          3928:   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
        !          3929:   shlibpath_var=LD_LIBRARY_PATH
        !          3930:   shlibpath_overrides_runpath=yes
        !          3931:   if test "$with_gnu_ld" = yes; then
        !          3932:     need_lib_prefix=no
        !          3933:   fi
        !          3934:   need_version=yes
        !          3935:   ;;
        !          3936:
        !          3937: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
        !          3938:   version_type=linux
        !          3939:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3940:   soname_spec='${libname}${release}.so$major'
        !          3941:   shlibpath_var=LD_LIBRARY_PATH
        !          3942:   case $host_vendor in
        !          3943:     sni)
        !          3944:       shlibpath_overrides_runpath=no
        !          3945:       ;;
        !          3946:     motorola)
        !          3947:       need_lib_prefix=no
        !          3948:       need_version=no
        !          3949:       shlibpath_overrides_runpath=no
        !          3950:       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
        !          3951:       ;;
        !          3952:   esac
        !          3953:   ;;
        !          3954:
        !          3955: sysv4*MP*)
        !          3956:   if test -d /usr/nec ;then
        !          3957:     version_type=linux
        !          3958:     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
        !          3959:     soname_spec='$libname.so.$major'
        !          3960:     shlibpath_var=LD_LIBRARY_PATH
        !          3961:   fi
        !          3962:   ;;
        !          3963:
        !          3964: uts4*)
        !          3965:   version_type=linux
        !          3966:   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
        !          3967:   soname_spec='${libname}${release}.so$major'
        !          3968:   shlibpath_var=LD_LIBRARY_PATH
        !          3969:   ;;
        !          3970:
        !          3971: *)
        !          3972:   dynamic_linker=no
        !          3973:   ;;
        !          3974: esac
        !          3975: AC_MSG_RESULT([$dynamic_linker])
        !          3976: test "$dynamic_linker" = no && can_build_shared=no
        !          3977: ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
        !          3978:
        !          3979:
        !          3980: # _LT_AC_TAGCONFIG
        !          3981: # ----------------
        !          3982: AC_DEFUN([_LT_AC_TAGCONFIG],
        !          3983: [AC_ARG_WITH([tags],
        !          3984:     [AC_HELP_STRING([--with-tags=TAGS],
        !          3985:        [include additional configurations @<:@CXX,GCJ@:>@])],
        !          3986:     [tagnames="$withval"],
        !          3987:     [tagnames="CXX,GCJ"
        !          3988:     case $host_os in
        !          3989:       mingw*|cygwin*) tagnames="$tagnames,RC" ;;
        !          3990:     esac])
        !          3991:
        !          3992: if test -f "$ltmain" && test -n "$tagnames"; then
        !          3993:   if test ! -f "${ofile}"; then
        !          3994:     AC_MSG_WARN([output file `$ofile' does not exist])
        !          3995:   fi
        !          3996:
        !          3997:   if test -z "$LTCC"; then
        !          3998:     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
        !          3999:     if test -z "$LTCC"; then
        !          4000:       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
        !          4001:     else
        !          4002:       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
        !          4003:     fi
        !          4004:   fi
        !          4005:
        !          4006:   # Extract list of available tagged configurations in $ofile.
        !          4007:   # Note that this assumes the entire list is on one line.
        !          4008:   available_tags=`grep "^available_tags=" "${ofile}" | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
        !          4009:
        !          4010:   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        !          4011:   for tagname in $tagnames; do
        !          4012:     IFS="$lt_save_ifs"
        !          4013:     # Check whether tagname contains only valid characters
        !          4014:     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
        !          4015:     "") ;;
        !          4016:     *)  AC_MSG_ERROR([invalid tag name: $tagname])
        !          4017:        ;;
        !          4018:     esac
        !          4019:
        !          4020:     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
        !          4021:     then
        !          4022:       AC_MSG_ERROR([tag name \"$tagname\" already exists])
        !          4023:     fi
        !          4024:
        !          4025:     # Update the list of available tags.
        !          4026:     if test -n "$tagname"; then
        !          4027:       echo appending configuration tag \"$tagname\" to $ofile
        !          4028:
        !          4029:       case $tagname in
        !          4030:       CXX)
        !          4031:        AC_LIBTOOL_LANG_CXX_CONFIG
        !          4032:        ;;
        !          4033:
        !          4034:       GCJ)
        !          4035:        AC_LIBTOOL_LANG_GCJ_CONFIG
        !          4036:        ;;
        !          4037:
        !          4038:       RC)
        !          4039:        AC_LIBTOOL_LANG_RC_CONFIG
        !          4040:        ;;
        !          4041:
        !          4042:       *)
        !          4043:        AC_MSG_ERROR([Unsupported tag name: $tagname])
        !          4044:        ;;
        !          4045:       esac
        !          4046:
        !          4047:       # Append the new tag name to the list of available tags.
        !          4048:       available_tags="$available_tags $tagname"
        !          4049:     fi
        !          4050:   done
        !          4051:   IFS="$lt_save_ifs"
        !          4052:
        !          4053:   # Now substitute the updated list of available tags.
        !          4054:   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
        !          4055:     mv "${ofile}T" "$ofile"
        !          4056:     chmod +x "$ofile"
        !          4057:   else
        !          4058:     rm -f "${ofile}T"
        !          4059:     AC_MSG_ERROR([unable to update list of available tagged configurations.])
        !          4060:   fi
        !          4061: fi
        !          4062: ])# _LT_AC_TAGCONFIG
        !          4063:
        !          4064:
        !          4065: # AC_LIBTOOL_DLOPEN
        !          4066: # -----------------
        !          4067: # enable checks for dlopen support
        !          4068: AC_DEFUN([AC_LIBTOOL_DLOPEN],
        !          4069:  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
        !          4070: ])# AC_LIBTOOL_DLOPEN
        !          4071:
        !          4072:
        !          4073: # AC_LIBTOOL_WIN32_DLL
        !          4074: # --------------------
        !          4075: # declare package support for building win32 dll's
        !          4076: AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
        !          4077: [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
        !          4078: ])# AC_LIBTOOL_WIN32_DLL
        !          4079:
        !          4080:
        !          4081: # AC_ENABLE_SHARED([DEFAULT])
        !          4082: # ---------------------------
        !          4083: # implement the --enable-shared flag
        !          4084: # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
        !          4085: AC_DEFUN([AC_ENABLE_SHARED],
        !          4086: [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
        !          4087: AC_ARG_ENABLE([shared],
        !          4088:     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
        !          4089:        [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
        !          4090:     [p=${PACKAGE-default}
        !          4091:     case $enableval in
        !          4092:     yes) enable_shared=yes ;;
        !          4093:     no) enable_shared=no ;;
        !          4094:     *)
        !          4095:       enable_shared=no
        !          4096:       # Look at the argument we got.  We use all the common list separators.
        !          4097:       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        !          4098:       for pkg in $enableval; do
        !          4099:        IFS="$lt_save_ifs"
        !          4100:        if test "X$pkg" = "X$p"; then
        !          4101:          enable_shared=yes
        !          4102:        fi
        !          4103:       done
        !          4104:       IFS="$lt_save_ifs"
        !          4105:       ;;
        !          4106:     esac],
        !          4107:     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
        !          4108: ])# AC_ENABLE_SHARED
        !          4109:
        !          4110:
        !          4111: # AC_DISABLE_SHARED
        !          4112: # -----------------
        !          4113: #- set the default shared flag to --disable-shared
        !          4114: AC_DEFUN([AC_DISABLE_SHARED],
        !          4115: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
        !          4116: AC_ENABLE_SHARED(no)
        !          4117: ])# AC_DISABLE_SHARED
        !          4118:
        !          4119:
        !          4120: # AC_ENABLE_STATIC([DEFAULT])
        !          4121: # ---------------------------
        !          4122: # implement the --enable-static flag
        !          4123: # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
        !          4124: AC_DEFUN([AC_ENABLE_STATIC],
        !          4125: [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
        !          4126: AC_ARG_ENABLE([static],
        !          4127:     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
        !          4128:        [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
        !          4129:     [p=${PACKAGE-default}
        !          4130:     case $enableval in
        !          4131:     yes) enable_static=yes ;;
        !          4132:     no) enable_static=no ;;
        !          4133:     *)
        !          4134:      enable_static=no
        !          4135:       # Look at the argument we got.  We use all the common list separators.
        !          4136:       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        !          4137:       for pkg in $enableval; do
        !          4138:        IFS="$lt_save_ifs"
        !          4139:        if test "X$pkg" = "X$p"; then
        !          4140:          enable_static=yes
        !          4141:        fi
        !          4142:       done
        !          4143:       IFS="$lt_save_ifs"
        !          4144:       ;;
        !          4145:     esac],
        !          4146:     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
        !          4147: ])# AC_ENABLE_STATIC
        !          4148:
        !          4149:
        !          4150: # AC_DISABLE_STATIC
        !          4151: # -----------------
        !          4152: # set the default static flag to --disable-static
        !          4153: AC_DEFUN([AC_DISABLE_STATIC],
        !          4154: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
        !          4155: AC_ENABLE_STATIC(no)
        !          4156: ])# AC_DISABLE_STATIC
        !          4157:
        !          4158:
        !          4159: # AC_ENABLE_FAST_INSTALL([DEFAULT])
        !          4160: # ---------------------------------
        !          4161: # implement the --enable-fast-install flag
        !          4162: # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
        !          4163: AC_DEFUN([AC_ENABLE_FAST_INSTALL],
        !          4164: [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
        !          4165: AC_ARG_ENABLE([fast-install],
        !          4166:     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
        !          4167:     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
        !          4168:     [p=${PACKAGE-default}
        !          4169:     case $enableval in
        !          4170:     yes) enable_fast_install=yes ;;
        !          4171:     no) enable_fast_install=no ;;
        !          4172:     *)
        !          4173:       enable_fast_install=no
        !          4174:       # Look at the argument we got.  We use all the common list separators.
        !          4175:       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
        !          4176:       for pkg in $enableval; do
        !          4177:        IFS="$lt_save_ifs"
        !          4178:        if test "X$pkg" = "X$p"; then
        !          4179:          enable_fast_install=yes
        !          4180:        fi
        !          4181:       done
        !          4182:       IFS="$lt_save_ifs"
        !          4183:       ;;
        !          4184:     esac],
        !          4185:     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
        !          4186: ])# AC_ENABLE_FAST_INSTALL
        !          4187:
        !          4188:
        !          4189: # AC_DISABLE_FAST_INSTALL
        !          4190: # -----------------------
        !          4191: # set the default to --disable-fast-install
        !          4192: AC_DEFUN([AC_DISABLE_FAST_INSTALL],
        !          4193: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
        !          4194: AC_ENABLE_FAST_INSTALL(no)
        !          4195: ])# AC_DISABLE_FAST_INSTALL
        !          4196:
        !          4197:
        !          4198: # AC_LIBTOOL_PICMODE([MODE])
        !          4199: # --------------------------
        !          4200: # implement the --with-pic flag
        !          4201: # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
        !          4202: AC_DEFUN([AC_LIBTOOL_PICMODE],
        !          4203: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
        !          4204: pic_mode=ifelse($#,1,$1,default)
        !          4205: ])# AC_LIBTOOL_PICMODE
        !          4206:
        !          4207:
        !          4208: # AC_PATH_TOOL_PREFIX
        !          4209: # -------------------
        !          4210: # find a file program which can recognise shared library
        !          4211: AC_DEFUN([AC_PATH_TOOL_PREFIX],
        !          4212: [AC_MSG_CHECKING([for $1])
        !          4213: AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
        !          4214: [case $MAGIC_CMD in
        !          4215: [[\\/*] |  ?:[\\/]*])
        !          4216:   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
        !          4217:   ;;
        !          4218: *)
        !          4219:   lt_save_MAGIC_CMD="$MAGIC_CMD"
        !          4220:   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
        !          4221: dnl $ac_dummy forces splitting on constant user-supplied paths.
        !          4222: dnl POSIX.2 word splitting is done only on the output of word expansions,
        !          4223: dnl not every word.  This closes a longstanding sh security hole.
        !          4224:   ac_dummy="ifelse([$2], , $PATH, [$2])"
        !          4225:   for ac_dir in $ac_dummy; do
        !          4226:     IFS="$lt_save_ifs"
        !          4227:     test -z "$ac_dir" && ac_dir=.
        !          4228:     if test -f $ac_dir/$1; then
        !          4229:       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
        !          4230:       if test -n "$file_magic_test_file"; then
        !          4231:        case $deplibs_check_method in
        !          4232:        "file_magic "*)
        !          4233:          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
        !          4234:          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
        !          4235:          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
        !          4236:            egrep "$file_magic_regex" > /dev/null; then
        !          4237:            :
        !          4238:          else
        !          4239:            cat <<EOF 1>&2
        !          4240:
        !          4241: *** Warning: the command libtool uses to detect shared libraries,
        !          4242: *** $file_magic_cmd, produces output that libtool cannot recognize.
        !          4243: *** The result is that libtool may fail to recognize shared libraries
        !          4244: *** as such.  This will affect the creation of libtool libraries that
        !          4245: *** depend on shared libraries, but programs linked with such libtool
        !          4246: *** libraries will work regardless of this problem.  Nevertheless, you
        !          4247: *** may want to report the problem to your system manager and/or to
        !          4248: *** bug-libtool@gnu.org
        !          4249:
        !          4250: EOF
        !          4251:          fi ;;
        !          4252:        esac
        !          4253:       fi
        !          4254:       break
        !          4255:     fi
        !          4256:   done
        !          4257:   IFS="$lt_save_ifs"
        !          4258:   MAGIC_CMD="$lt_save_MAGIC_CMD"
        !          4259:   ;;
        !          4260: esac])
        !          4261: MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
        !          4262: if test -n "$MAGIC_CMD"; then
        !          4263:   AC_MSG_RESULT($MAGIC_CMD)
        !          4264: else
        !          4265:   AC_MSG_RESULT(no)
        !          4266: fi
        !          4267: ])# AC_PATH_TOOL_PREFIX
        !          4268:
        !          4269:
        !          4270: # AC_PATH_MAGIC
        !          4271: # -------------
        !          4272: # find a file program which can recognise a shared library
        !          4273: AC_DEFUN([AC_PATH_MAGIC],
        !          4274: [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
        !          4275: if test -z "$lt_cv_path_MAGIC_CMD"; then
        !          4276:   if test -n "$ac_tool_prefix"; then
        !          4277:     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
        !          4278:   else
        !          4279:     MAGIC_CMD=:
        !          4280:   fi
        !          4281: fi
        !          4282: ])# AC_PATH_MAGIC
        !          4283:
        !          4284:
        !          4285: # AC_PROG_LD
        !          4286: # ----------
        !          4287: # find the path to the GNU or non-GNU linker
        !          4288: AC_DEFUN([AC_PROG_LD],
        !          4289: [AC_ARG_WITH([gnu-ld],
        !          4290:     [AC_HELP_STRING([--with-gnu-ld],
        !          4291:        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
        !          4292:     [test "$withval" = no || with_gnu_ld=yes],
        !          4293:     [with_gnu_ld=no])
        !          4294: AC_REQUIRE([AC_PROG_CC])dnl
        !          4295: AC_REQUIRE([AC_CANONICAL_HOST])dnl
        !          4296: AC_REQUIRE([AC_CANONICAL_BUILD])dnl
        !          4297: ac_prog=ld
        !          4298: if test "$GCC" = yes; then
1.1       maekawa  4299:   # Check if gcc -print-prog-name=ld gives a path.
                   4300:   AC_MSG_CHECKING([for ld used by GCC])
1.1.1.3 ! ohara    4301:   case $host in
1.1.1.2   maekawa  4302:   *-*-mingw*)
                   4303:     # gcc leaves a trailing carriage return which upsets mingw
                   4304:     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
                   4305:   *)
                   4306:     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
                   4307:   esac
1.1.1.3 ! ohara    4308:   case $ac_prog in
1.1       maekawa  4309:     # Accept absolute paths.
1.1.1.3 ! ohara    4310:     [[\\/]]* | ?:[[\\/]]*)
        !          4311:       re_direlt='/[[^/]][[^/]]*/\.\./'
1.1       maekawa  4312:       # Canonicalize the path of ld
                   4313:       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
                   4314:       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
                   4315:        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
                   4316:       done
                   4317:       test -z "$LD" && LD="$ac_prog"
                   4318:       ;;
                   4319:   "")
                   4320:     # If it fails, then pretend we aren't using GCC.
                   4321:     ac_prog=ld
                   4322:     ;;
                   4323:   *)
                   4324:     # If it is relative, then search for the first ld in PATH.
                   4325:     with_gnu_ld=unknown
                   4326:     ;;
                   4327:   esac
                   4328: elif test "$with_gnu_ld" = yes; then
                   4329:   AC_MSG_CHECKING([for GNU ld])
                   4330: else
                   4331:   AC_MSG_CHECKING([for non-GNU ld])
                   4332: fi
1.1.1.3 ! ohara    4333: AC_CACHE_VAL(lt_cv_path_LD,
1.1       maekawa  4334: [if test -z "$LD"; then
1.1.1.3 ! ohara    4335:   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1.1       maekawa  4336:   for ac_dir in $PATH; do
1.1.1.3 ! ohara    4337:     IFS="$lt_save_ifs"
1.1       maekawa  4338:     test -z "$ac_dir" && ac_dir=.
                   4339:     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1.1.1.3 ! ohara    4340:       lt_cv_path_LD="$ac_dir/$ac_prog"
1.1       maekawa  4341:       # Check to see if the program is GNU ld.  I'd rather use --version,
                   4342:       # but apparently some GNU ld's only accept -v.
                   4343:       # Break only if it was the GNU/non-GNU ld that we prefer.
1.1.1.3 ! ohara    4344:       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1.1       maekawa  4345:        test "$with_gnu_ld" != no && break
                   4346:       else
                   4347:        test "$with_gnu_ld" != yes && break
                   4348:       fi
                   4349:     fi
                   4350:   done
1.1.1.3 ! ohara    4351:   IFS="$lt_save_ifs"
1.1       maekawa  4352: else
1.1.1.3 ! ohara    4353:   lt_cv_path_LD="$LD" # Let the user override the test with a path.
1.1       maekawa  4354: fi])
1.1.1.3 ! ohara    4355: LD="$lt_cv_path_LD"
1.1       maekawa  4356: if test -n "$LD"; then
                   4357:   AC_MSG_RESULT($LD)
                   4358: else
                   4359:   AC_MSG_RESULT(no)
                   4360: fi
                   4361: test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
                   4362: AC_PROG_LD_GNU
1.1.1.3 ! ohara    4363: ])# AC_PROG_LD
        !          4364:
1.1       maekawa  4365:
1.1.1.3 ! ohara    4366: # AC_PROG_LD_GNU
        !          4367: # --------------
        !          4368: AC_DEFUN([AC_PROG_LD_GNU],
        !          4369: [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
1.1       maekawa  4370: [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
                   4371: if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1.1.1.3 ! ohara    4372:   lt_cv_prog_gnu_ld=yes
1.1       maekawa  4373: else
1.1.1.3 ! ohara    4374:   lt_cv_prog_gnu_ld=no
1.1       maekawa  4375: fi])
1.1.1.3 ! ohara    4376: with_gnu_ld=$lt_cv_prog_gnu_ld
        !          4377: ])# AC_PROG_LD_GNU
        !          4378:
1.1.1.2   maekawa  4379:
1.1.1.3 ! ohara    4380: # AC_PROG_LD_RELOAD_FLAG
        !          4381: # ----------------------
        !          4382: # find reload flag for linker
1.1.1.2   maekawa  4383: #   -- PORTME Some linkers may need a different reload flag.
1.1.1.3 ! ohara    4384: AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
        !          4385: [AC_CACHE_CHECK([for $LD option to reload object files],
        !          4386:   lt_cv_ld_reload_flag,
        !          4387:   [lt_cv_ld_reload_flag='-r'])
1.1.1.2   maekawa  4388: reload_flag=$lt_cv_ld_reload_flag
1.1.1.3 ! ohara    4389: case $reload_flag in
        !          4390: "" | " "*) ;;
        !          4391: *) reload_flag=" $reload_flag" ;;
        !          4392: esac
        !          4393: reload_cmds='$LD$reload_flag -o $output$reload_objs'
        !          4394: ])# AC_PROG_LD_RELOAD_FLAG
1.1.1.2   maekawa  4395:
1.1.1.3 ! ohara    4396:
        !          4397: # AC_DEPLIBS_CHECK_METHOD
        !          4398: # -----------------------
        !          4399: # how to check for library dependencies
1.1.1.2   maekawa  4400: #  -- PORTME fill in with the dynamic library characteristics
1.1.1.3 ! ohara    4401: AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
1.1.1.2   maekawa  4402: [AC_CACHE_CHECK([how to recognise dependant libraries],
                   4403: lt_cv_deplibs_check_method,
1.1.1.3 ! ohara    4404: [lt_cv_file_magic_cmd='$MAGIC_CMD'
1.1.1.2   maekawa  4405: lt_cv_file_magic_test_file=
                   4406: lt_cv_deplibs_check_method='unknown'
                   4407: # Need to set the preceding variable on all platforms that support
                   4408: # interlibrary dependencies.
                   4409: # 'none' -- dependencies not supported.
                   4410: # `unknown' -- same as none, but documents that we really don't know.
                   4411: # 'pass_all' -- all dependencies passed with no checks.
                   4412: # 'test_compile' -- check by making test program.
1.1.1.3 ! ohara    4413: # 'file_magic [[regex]]' -- check by looking for files in library path
1.1.1.2   maekawa  4414: # which responds to the $file_magic_cmd with a given egrep regex.
                   4415: # If you have `file' or equivalent on your system and you're not sure
                   4416: # whether `pass_all' will *always* work, you probably want this one.
                   4417:
1.1.1.3 ! ohara    4418: case $host_os in
        !          4419: aix4* | aix5*)
        !          4420:   lt_cv_deplibs_check_method=pass_all
        !          4421:   ;;
        !          4422:
        !          4423: beos*)
1.1.1.2   maekawa  4424:   lt_cv_deplibs_check_method=pass_all
                   4425:   ;;
                   4426:
                   4427: bsdi4*)
1.1.1.3 ! ohara    4428:   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
        !          4429:   lt_cv_file_magic_cmd='/usr/bin/file -L'
1.1.1.2   maekawa  4430:   lt_cv_file_magic_test_file=/shlib/libc.so
                   4431:   ;;
                   4432:
1.1.1.3 ! ohara    4433: cygwin* | mingw* | pw32*)
1.1.1.2   maekawa  4434:   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1.1.1.3 ! ohara    4435:   lt_cv_file_magic_cmd='$OBJDUMP -f'
1.1.1.2   maekawa  4436:   ;;
                   4437:
1.1.1.3 ! ohara    4438: darwin* | rhapsody*)
        !          4439:   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
        !          4440:   lt_cv_file_magic_cmd='/usr/bin/file -L'
        !          4441:   case "$host_os" in
        !          4442:   rhapsody* | darwin1.[[012]])
        !          4443:     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
        !          4444:     ;;
        !          4445:   *) # Darwin 1.3 on
        !          4446:     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1.1.1.2   maekawa  4447:     ;;
                   4448:   esac
                   4449:   ;;
                   4450:
1.1.1.3 ! ohara    4451: freebsd*)
        !          4452:   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
        !          4453:     case $host_cpu in
        !          4454:     i*86 )
        !          4455:       # Not sure whether the presence of OpenBSD here was a mistake.
        !          4456:       # Let's accept both of them until this is cleared up.
        !          4457:       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
        !          4458:       lt_cv_file_magic_cmd=/usr/bin/file
        !          4459:       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
        !          4460:       ;;
        !          4461:     esac
        !          4462:   else
        !          4463:     lt_cv_deplibs_check_method=pass_all
        !          4464:   fi
        !          4465:   ;;
        !          4466:
1.1.1.2   maekawa  4467: gnu*)
                   4468:   lt_cv_deplibs_check_method=pass_all
                   4469:   ;;
                   4470:
1.1.1.3 ! ohara    4471: hpux10.20* | hpux11*)
        !          4472:   lt_cv_file_magic_cmd=/usr/bin/file
        !          4473:   if test "$host_cpu" = ia64; then
        !          4474:     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
        !          4475:     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
        !          4476:   else
        !          4477:     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
        !          4478:     lt_cv_file_magic_test_file=/usr/lib/libc.sl
        !          4479:   fi
        !          4480:   ;;
        !          4481:
        !          4482: irix5* | irix6*)
        !          4483:   case $host_os in
1.1.1.2   maekawa  4484:   irix5*)
                   4485:     # this will be overridden with pass_all, but let us keep it just in case
                   4486:     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
                   4487:     ;;
                   4488:   *)
1.1.1.3 ! ohara    4489:     case $LD in
1.1.1.2   maekawa  4490:     *-32|*"-32 ") libmagic=32-bit;;
                   4491:     *-n32|*"-n32 ") libmagic=N32;;
                   4492:     *-64|*"-64 ") libmagic=64-bit;;
                   4493:     *) libmagic=never-match;;
                   4494:     esac
                   4495:     # this will be overridden with pass_all, but let us keep it just in case
1.1.1.3 ! ohara    4496:     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
1.1.1.2   maekawa  4497:     ;;
                   4498:   esac
                   4499:   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
                   4500:   lt_cv_deplibs_check_method=pass_all
                   4501:   ;;
                   4502:
                   4503: # This must be Linux ELF.
1.1.1.3 ! ohara    4504: linux*)
        !          4505:   case $host_cpu in
        !          4506:   alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
1.1.1.2   maekawa  4507:     lt_cv_deplibs_check_method=pass_all ;;
                   4508:   *)
                   4509:     # glibc up to 2.1.1 does not perform some relocations on ARM
1.1.1.3 ! ohara    4510:     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
1.1.1.2   maekawa  4511:   esac
                   4512:   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
                   4513:   ;;
                   4514:
1.1.1.3 ! ohara    4515: netbsd*)
        !          4516:   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
        !          4517:     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
        !          4518:   else
        !          4519:     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
        !          4520:   fi
        !          4521:   ;;
        !          4522:
        !          4523: newos6*)
        !          4524:   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
        !          4525:   lt_cv_file_magic_cmd=/usr/bin/file
        !          4526:   lt_cv_file_magic_test_file=/usr/lib/libnls.so
        !          4527:   ;;
        !          4528:
        !          4529: nto-qnx)
        !          4530:   lt_cv_deplibs_check_method=unknown
        !          4531:   ;;
        !          4532:
        !          4533: openbsd*)
        !          4534:   lt_cv_file_magic_cmd=/usr/bin/file
        !          4535:   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
        !          4536:   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
        !          4537:     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
        !          4538:   else
        !          4539:     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
        !          4540:   fi
        !          4541:   ;;
        !          4542:
1.1.1.2   maekawa  4543: osf3* | osf4* | osf5*)
                   4544:   # this will be overridden with pass_all, but let us keep it just in case
                   4545:   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
                   4546:   lt_cv_file_magic_test_file=/shlib/libc.so
                   4547:   lt_cv_deplibs_check_method=pass_all
                   4548:   ;;
                   4549:
                   4550: sco3.2v5*)
                   4551:   lt_cv_deplibs_check_method=pass_all
                   4552:   ;;
                   4553:
                   4554: solaris*)
                   4555:   lt_cv_deplibs_check_method=pass_all
                   4556:   lt_cv_file_magic_test_file=/lib/libc.so
                   4557:   ;;
                   4558:
                   4559: sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1.1.1.3 ! ohara    4560:   case $host_vendor in
        !          4561:   motorola)
        !          4562:     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
        !          4563:     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
        !          4564:     ;;
1.1.1.2   maekawa  4565:   ncr)
                   4566:     lt_cv_deplibs_check_method=pass_all
                   4567:     ;;
1.1.1.3 ! ohara    4568:   sequent)
        !          4569:     lt_cv_file_magic_cmd='/bin/file'
        !          4570:     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
        !          4571:     ;;
        !          4572:   sni)
        !          4573:     lt_cv_file_magic_cmd='/bin/file'
        !          4574:     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
        !          4575:     lt_cv_file_magic_test_file=/lib/libc.so
1.1.1.2   maekawa  4576:     ;;
                   4577:   esac
                   4578:   ;;
1.1.1.3 ! ohara    4579:
        !          4580: sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
        !          4581:   lt_cv_deplibs_check_method=pass_all
        !          4582:   ;;
1.1.1.2   maekawa  4583: esac
                   4584: ])
                   4585: file_magic_cmd=$lt_cv_file_magic_cmd
                   4586: deplibs_check_method=$lt_cv_deplibs_check_method
1.1.1.3 ! ohara    4587: test -z "$deplibs_check_method" && deplibs_check_method=unknown
        !          4588: ])# AC_DEPLIBS_CHECK_METHOD
1.1       maekawa  4589:
1.1.1.2   maekawa  4590:
1.1.1.3 ! ohara    4591: # AC_PROG_NM
        !          4592: # ----------
        !          4593: # find the path to a BSD-compatible name lister
        !          4594: AC_DEFUN([AC_PROG_NM],
        !          4595: [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
1.1       maekawa  4596: [if test -n "$NM"; then
                   4597:   # Let the user override the test.
1.1.1.3 ! ohara    4598:   lt_cv_path_NM="$NM"
1.1       maekawa  4599: else
1.1.1.3 ! ohara    4600:   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1.1       maekawa  4601:   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1.1.1.3 ! ohara    4602:     IFS="$lt_save_ifs"
1.1       maekawa  4603:     test -z "$ac_dir" && ac_dir=.
1.1.1.3 ! ohara    4604:     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
        !          4605:     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
1.1       maekawa  4606:       # Check to see if the nm accepts a BSD-compat flag.
                   4607:       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
                   4608:       #   nm: unknown option "B" ignored
1.1.1.3 ! ohara    4609:       # Tru64's nm complains that /dev/null is an invalid object file
        !          4610:       if ("$tmp_nm" -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
        !          4611:        lt_cv_path_NM="$tmp_nm -B"
1.1       maekawa  4612:        break
1.1.1.3 ! ohara    4613:       elif ("$tmp_nm" -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
        !          4614:        lt_cv_path_NM="$tmp_nm -p"
1.1       maekawa  4615:        break
                   4616:       else
1.1.1.3 ! ohara    4617:        lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
1.1       maekawa  4618:        continue # so that we can try to find one that supports BSD flags
                   4619:       fi
                   4620:     fi
                   4621:   done
1.1.1.3 ! ohara    4622:   IFS="$lt_save_ifs"
        !          4623:   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
1.1       maekawa  4624: fi])
1.1.1.3 ! ohara    4625: NM="$lt_cv_path_NM"
        !          4626: ])# AC_PROG_NM
1.1       maekawa  4627:
1.1.1.3 ! ohara    4628:
        !          4629: # AC_CHECK_LIBM
        !          4630: # -------------
        !          4631: # check for math library
        !          4632: AC_DEFUN([AC_CHECK_LIBM],
1.1       maekawa  4633: [AC_REQUIRE([AC_CANONICAL_HOST])dnl
                   4634: LIBM=
1.1.1.3 ! ohara    4635: case $host in
        !          4636: *-*-beos* | *-*-cygwin* | *-*-pw32*)
1.1       maekawa  4637:   # These system don't have libm
                   4638:   ;;
                   4639: *-ncr-sysv4.3*)
                   4640:   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
                   4641:   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
                   4642:   ;;
                   4643: *)
                   4644:   AC_CHECK_LIB(m, main, LIBM="-lm")
                   4645:   ;;
                   4646: esac
1.1.1.3 ! ohara    4647: ])# AC_CHECK_LIBM
1.1       maekawa  4648:
1.1.1.3 ! ohara    4649:
        !          4650: # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
        !          4651: # -----------------------------------
        !          4652: # sets LIBLTDL to the link flags for the libltdl convenience library and
        !          4653: # LTDLINCL to the include flags for the libltdl header and adds
        !          4654: # --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
        !          4655: # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
        !          4656: # DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
        !          4657: # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
        !          4658: # '${top_srcdir}/' (note the single quotes!).  If your package is not
        !          4659: # flat and you're not using automake, define top_builddir and
        !          4660: # top_srcdir appropriately in the Makefiles.
        !          4661: AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
        !          4662: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
        !          4663:   case $enable_ltdl_convenience in
1.1       maekawa  4664:   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
                   4665:   "") enable_ltdl_convenience=yes
                   4666:       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
                   4667:   esac
1.1.1.3 ! ohara    4668:   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
        !          4669:   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
        !          4670:   # For backwards non-gettext consistent compatibility...
        !          4671:   INCLTDL="$LTDLINCL"
        !          4672: ])# AC_LIBLTDL_CONVENIENCE
        !          4673:
        !          4674:
        !          4675: # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
        !          4676: # -----------------------------------
        !          4677: # sets LIBLTDL to the link flags for the libltdl installable library and
        !          4678: # LTDLINCL to the include flags for the libltdl header and adds
        !          4679: # --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
        !          4680: # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
        !          4681: # DIRECTORY is not provided and an installed libltdl is not found, it is
        !          4682: # assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
        !          4683: # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
        !          4684: # quotes!).  If your package is not flat and you're not using automake,
        !          4685: # define top_builddir and top_srcdir appropriately in the Makefiles.
1.1       maekawa  4686: # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
1.1.1.3 ! ohara    4687: AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
        !          4688: [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1.1       maekawa  4689:   AC_CHECK_LIB(ltdl, main,
                   4690:   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
                   4691:   [if test x"$enable_ltdl_install" = xno; then
                   4692:      AC_MSG_WARN([libltdl not installed, but installation disabled])
                   4693:    else
                   4694:      enable_ltdl_install=yes
                   4695:    fi
                   4696:   ])
                   4697:   if test x"$enable_ltdl_install" = x"yes"; then
                   4698:     ac_configure_args="$ac_configure_args --enable-ltdl-install"
1.1.1.3 ! ohara    4699:     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
        !          4700:     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
1.1       maekawa  4701:   else
                   4702:     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
                   4703:     LIBLTDL="-lltdl"
1.1.1.3 ! ohara    4704:     LTDLINCL=
1.1       maekawa  4705:   fi
1.1.1.3 ! ohara    4706:   # For backwards non-gettext consistent compatibility...
        !          4707:   INCLTDL="$LTDLINCL"
        !          4708: ])# AC_LIBLTDL_INSTALLABLE
        !          4709:
        !          4710:
        !          4711: # If this macro is not defined by Autoconf, define it here.
        !          4712: ifdef([AC_PROVIDE_IFELSE],
        !          4713:       [],
        !          4714:       [define([AC_PROVIDE_IFELSE],
        !          4715:              [ifdef([AC_PROVIDE_$1],
        !          4716:                     [$2], [$3])])])
        !          4717:
        !          4718:
        !          4719: # AC_LIBTOOL_CXX
        !          4720: # --------------
        !          4721: # enable support for C++ libraries
        !          4722: AC_DEFUN([AC_LIBTOOL_CXX],
        !          4723: [AC_REQUIRE([_LT_AC_LANG_CXX])
        !          4724: ])# AC_LIBTOOL_CXX
        !          4725:
        !          4726:
        !          4727: # _LT_AC_LANG_CXX
        !          4728: # ---------------
        !          4729: AC_DEFUN([_LT_AC_LANG_CXX],
        !          4730: [AC_REQUIRE([AC_PROG_CXX])
        !          4731: AC_REQUIRE([AC_PROG_CXXCPP])
        !          4732: ])# _LT_AC_LANG_CXX
        !          4733:
        !          4734:
        !          4735: # AC_LIBTOOL_GCJ
        !          4736: # --------------
        !          4737: # enable support for GCJ libraries
        !          4738: AC_DEFUN([AC_LIBTOOL_GCJ],
        !          4739: [AC_REQUIRE([_LT_AC_LANG_GCJ])
        !          4740: ])# AC_LIBTOOL_GCJ
        !          4741:
        !          4742:
        !          4743: # _LT_AC_LANG_GCJ
        !          4744: # ---------------
        !          4745: AC_DEFUN([_LT_AC_LANG_GCJ],
        !          4746: [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
        !          4747:   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
        !          4748:     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
        !          4749:       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
        !          4750:         [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
        !          4751:           [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
        !          4752: ])# _LT_AC_LANG_GCJ
        !          4753:
        !          4754:
        !          4755: # AC_LIBTOOL_RC
        !          4756: # --------------
        !          4757: # enable support for Windows resource files
        !          4758: AC_DEFUN([AC_LIBTOOL_RC],
        !          4759: [AC_REQUIRE([AC_PROG_RC])
        !          4760: ])# AC_LIBTOOL_RC
        !          4761:
        !          4762:
        !          4763: # AC_LIBTOOL_LANG_C_CONFIG
        !          4764: # ------------------------
        !          4765: # Ensure that the configuration vars for the C compiler are
        !          4766: # suitably defined.  Those variables are subsequently used by
        !          4767: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
        !          4768: AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
        !          4769: AC_DEFUN([_LT_AC_LANG_C_CONFIG],
        !          4770: [lt_save_CC="$CC"
        !          4771: AC_LANG_PUSH(C)
        !          4772:
        !          4773: # Source file extension for C test sources.
        !          4774: ac_ext=c
        !          4775:
        !          4776: # Object file extension for compiled C test sources.
        !          4777: objext=o
        !          4778: _LT_AC_TAGVAR(objext, $1)=$objext
        !          4779:
        !          4780: # Code to be used in simple compile tests
        !          4781: lt_simple_compile_test_code="int some_variable = 0;"
        !          4782:
        !          4783: # Code to be used in simple link tests
        !          4784: lt_simple_link_test_code='main(){return(0);}'
        !          4785:
        !          4786: _LT_AC_SYS_COMPILER
        !          4787:
        !          4788: #
        !          4789: # Check for any special shared library compilation flags.
        !          4790: #
        !          4791: _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
        !          4792: if test "$GCC" = no; then
        !          4793:   case $host_os in
        !          4794:   sco3.2v5*)
        !          4795:     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
        !          4796:     ;;
        !          4797:   esac
        !          4798: fi
        !          4799: if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
        !          4800:   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
        !          4801:   if echo "$old_CC $old_CFLAGS " | egrep -e "[[        ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
        !          4802:   else
        !          4803:     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
        !          4804:     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
        !          4805:   fi
        !          4806: fi
        !          4807:
        !          4808:
        !          4809: #
        !          4810: # Check to make sure the static flag actually works.
        !          4811: #
        !          4812: AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
        !          4813:   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
        !          4814:   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
        !          4815:   [],
        !          4816:   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
        !          4817:
        !          4818:
        !          4819: AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
        !          4820: AC_LIBTOOL_PROG_COMPILER_PIC($1)
        !          4821: AC_LIBTOOL_PROG_CC_C_O($1)
        !          4822: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
        !          4823: AC_LIBTOOL_PROG_LD_SHLIBS($1)
        !          4824: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
        !          4825: AC_LIBTOOL_SYS_LIB_STRIP
        !          4826: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
        !          4827: AC_LIBTOOL_DLOPEN_SELF($1)
        !          4828:
        !          4829: # Report which librarie types wil actually be built
        !          4830: AC_MSG_CHECKING([if libtool supports shared libraries])
        !          4831: AC_MSG_RESULT([$can_build_shared])
        !          4832:
        !          4833: AC_MSG_CHECKING([whether to build shared libraries])
        !          4834: test "$can_build_shared" = "no" && enable_shared=no
        !          4835:
        !          4836: # On AIX, shared libraries and static libraries use the same namespace, and
        !          4837: # are all built from PIC.
        !          4838: case "$host_os" in
        !          4839: aix3*)
        !          4840:   test "$enable_shared" = yes && enable_static=no
        !          4841:   if test -n "$RANLIB"; then
        !          4842:     archive_cmds="$archive_cmds~\$RANLIB \$lib"
        !          4843:     postinstall_cmds='$RANLIB $lib'
        !          4844:   fi
        !          4845:   ;;
        !          4846:
        !          4847: aix4*)
        !          4848:   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
        !          4849:     test "$enable_shared" = yes && enable_static=no
        !          4850:   fi
        !          4851:   ;;
        !          4852: esac
        !          4853: AC_MSG_RESULT([$enable_shared])
        !          4854:
        !          4855: AC_MSG_CHECKING([whether to build static libraries])
        !          4856: # Make sure either enable_shared or enable_static is yes.
        !          4857: test "$enable_shared" = yes || enable_static=yes
        !          4858: AC_MSG_RESULT([$enable_static])
        !          4859:
        !          4860: AC_LIBTOOL_CONFIG($1)
        !          4861:
        !          4862: AC_LANG_POP
        !          4863: CC="$lt_save_CC"
        !          4864: ])# AC_LIBTOOL_LANG_C_CONFIG
        !          4865:
        !          4866:
        !          4867: # AC_LIBTOOL_LANG_CXX_CONFIG
        !          4868: # --------------------------
        !          4869: # Ensure that the configuration vars for the C compiler are
        !          4870: # suitably defined.  Those variables are subsequently used by
        !          4871: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
        !          4872: AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
        !          4873: AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
        !          4874: [AC_LANG_PUSH(C++)
        !          4875: AC_REQUIRE([AC_PROG_CXX])
        !          4876: AC_REQUIRE([AC_PROG_CXXCPP])
        !          4877:
        !          4878: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          4879: _LT_AC_TAGVAR(allow_undefined_flag, $1)=
        !          4880: _LT_AC_TAGVAR(always_export_symbols, $1)=no
        !          4881: _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
        !          4882: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
        !          4883: _LT_AC_TAGVAR(hardcode_direct, $1)=no
        !          4884: _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
        !          4885: _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
        !          4886: _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
        !          4887: _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
        !          4888: _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
        !          4889: _LT_AC_TAGVAR(no_undefined_flag, $1)=
        !          4890: _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
        !          4891:
        !          4892: # Dependencies to place before and after the object being linked:
        !          4893: _LT_AC_TAGVAR(predep_objects, $1)=
        !          4894: _LT_AC_TAGVAR(postdep_objects, $1)=
        !          4895: _LT_AC_TAGVAR(predeps, $1)=
        !          4896: _LT_AC_TAGVAR(postdeps, $1)=
        !          4897: _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
        !          4898:
        !          4899: # Source file extension for C test sources.
        !          4900: ac_ext=cc
        !          4901:
        !          4902: # Object file extension for compiled C test sources.
        !          4903: objext=o
        !          4904: _LT_AC_TAGVAR(objext, $1)=$objext
        !          4905:
        !          4906: # Code to be used in simple compile tests
        !          4907: lt_simple_compile_test_code="int some_variable = 0;"
        !          4908:
        !          4909: # Code to be used in simple link tests
        !          4910: lt_simple_link_test_code='int main(int char *[]) { return(0); }'
        !          4911:
        !          4912: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
        !          4913: _LT_AC_SYS_COMPILER
        !          4914:
        !          4915: # Allow CC to be a program name with arguments.
        !          4916: lt_save_CC="$CC"
        !          4917: CC=${CXX-"c++"}
        !          4918: set dummy $CC
        !          4919: compiler="[$]2"
        !          4920: _LT_AC_TAGVAR(compiler, $1)=$CC
        !          4921: cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
        !          4922:
        !          4923: # We don't want -fno-exception wen compiling C++ code, so set the
        !          4924: # no_builtin_flag separately
        !          4925: if test "$GXX" = yes; then
        !          4926:   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
        !          4927: else
        !          4928:   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
        !          4929: fi
        !          4930:
        !          4931: if test "$GXX" = yes; then
        !          4932:   # Set up default GNU C++ configuration
        !          4933:
        !          4934:   # Check if GNU C++ uses GNU ld as the underlying linker, since the
        !          4935:   # archiving commands below assume that GNU ld is being used.
        !          4936:   if eval "`$CC -print-prog-name=ld` --version 2>&1" | \
        !          4937:       egrep 'GNU ld' > /dev/null; then
        !          4938:     with_gnu_ld=yes
        !          4939:
        !          4940:     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          4941:     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
        !          4942:
        !          4943:     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
        !          4944:     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
        !          4945:
        !          4946:     # If archive_cmds runs LD, not CC, wlarc should be empty
        !          4947:     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
        !          4948:     #     investigate it a little bit more. (MM)
        !          4949:     wlarc='${wl}'
        !          4950:
        !          4951:     # ancient GNU ld didn't support --whole-archive et. al.
        !          4952:     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
        !          4953:        egrep 'no-whole-archive' > /dev/null; then
        !          4954:       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
        !          4955:     else
        !          4956:       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
        !          4957:     fi
        !          4958:   else
        !          4959:     with_gnu_ld=no
        !          4960:     wlarc=
        !          4961:
        !          4962:     # A generic and very simple default shared library creation
        !          4963:     # command for GNU C++ for the case where it uses the native
        !          4964:     # linker, instead of GNU ld.  If possible, this setting should
        !          4965:     # overridden to take advantage of the native linker features on
        !          4966:     # the platform it is being used on.
        !          4967:     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
        !          4968:   fi
        !          4969:
        !          4970:   # Commands to make compiler produce verbose output that lists
        !          4971:   # what "hidden" libraries, object files and flags are used when
        !          4972:   # linking a shared library.
        !          4973:   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
        !          4974:
        !          4975: else
        !          4976:   GXX=no
        !          4977:   with_gnu_ld=no
        !          4978:   wlarc=
        !          4979: fi
        !          4980:
        !          4981: # PORTME: fill in a description of your system's C++ link characteristics
        !          4982: AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
        !          4983: _LT_AC_TAGVAR(ld_shlibs, $1)=yes
        !          4984: case $host_os in
        !          4985:   aix3*)
        !          4986:     # FIXME: insert proper C++ library support
        !          4987:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          4988:     ;;
        !          4989:   aix4* | aix5*)
        !          4990:     if test "$host_cpu" = ia64; then
        !          4991:       # On IA64, the linker does run time linking by default, so we don't
        !          4992:       # have to do anything special.
        !          4993:       aix_use_runtimelinking=no
        !          4994:       exp_sym_flag='-Bexport'
        !          4995:       no_entry_flag=""
        !          4996:     else
        !          4997:       aix_use_runtimelinking=no
        !          4998:
        !          4999:       # Test if we are trying to use run time linking or normal
        !          5000:       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
        !          5001:       # need to do runtime linking.
        !          5002:       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
        !          5003:        for ld_flag in $LDFLAGS; do
        !          5004:          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
        !          5005:            aix_use_runtimelinking=yes
        !          5006:            break
        !          5007:          fi
        !          5008:        done
        !          5009:       esac
        !          5010:
        !          5011:       exp_sym_flag='-bexport'
        !          5012:       no_entry_flag='-bnoentry'
        !          5013:     fi
        !          5014:
        !          5015:     # When large executables or shared objects are built, AIX ld can
        !          5016:     # have problems creating the table of contents.  If linking a library
        !          5017:     # or program results in "error TOC overflow" add -mminimal-toc to
        !          5018:     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
        !          5019:     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
        !          5020:
        !          5021:     _LT_AC_TAGVAR(archive_cmds, $1)=''
        !          5022:     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          5023:     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
        !          5024:     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          5025:
        !          5026:     if test "$GXX" = yes; then
        !          5027:       case $host_os in aix4.[012]|aix4.[012].*)
        !          5028:       # We only want to do this on AIX 4.2 and lower, the check
        !          5029:       # below for broken collect2 doesn't work under 4.3+
        !          5030:        collect2name=`${CC} -print-prog-name=collect2`
        !          5031:        if test -f "$collect2name" && \
        !          5032:           strings "$collect2name" | grep resolve_lib_name >/dev/null
        !          5033:        then
        !          5034:          # We have reworked collect2
        !          5035:          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          5036:        else
        !          5037:          # We have old collect2
        !          5038:          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
        !          5039:          # It fails to find uninstalled libraries when the uninstalled
        !          5040:          # path is not listed in the libpath.  Setting hardcode_minus_L
        !          5041:          # to unsupported forces relinking
        !          5042:          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          5043:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          5044:          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
        !          5045:        fi
        !          5046:       esac
        !          5047:       shared_flag='-shared'
        !          5048:     else
        !          5049:       # not using gcc
        !          5050:       if test "$host_cpu" = ia64; then
        !          5051:        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        !          5052:        # chokes on -Wl,-G. The following line is correct:
        !          5053:        shared_flag='-G'
        !          5054:       else
        !          5055:        if test "$aix_use_runtimelinking" = yes; then
        !          5056:          shared_flag='${wl}-G'
        !          5057:        else
        !          5058:          shared_flag='${wl}-bM:SRE'
        !          5059:        fi
        !          5060:       fi
        !          5061:     fi
        !          5062:
        !          5063:     # It seems that -bexpall does not export symbols beginning with
        !          5064:     # underscore (_), so it is better to generate a list of symbols to export.
        !          5065:     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          5066:     if test "$aix_use_runtimelinking" = yes; then
        !          5067:       # Warning - without using the other runtime loading flags (-brtl),
        !          5068:       # -berok will link without error, but may produce a broken library.
        !          5069:       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
        !          5070:       # Determine the default libpath from the value encoded in an empty executable.
        !          5071:       _LT_AC_SYS_LIBPATH_AIX
        !          5072:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
        !          5073:
        !          5074:       _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
        !          5075:      else
        !          5076:       if test "$host_cpu" = ia64; then
        !          5077:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
        !          5078:        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
        !          5079:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
        !          5080:       else
        !          5081:        # Determine the default libpath from the value encoded in an empty executable.
        !          5082:        _LT_AC_SYS_LIBPATH_AIX
        !          5083:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
        !          5084:        # Warning - without using the other run time loading flags,
        !          5085:        # -berok will link without error, but may produce a broken library.
        !          5086:        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
        !          5087:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
        !          5088:        # -bexpall does not export symbols beginning with underscore (_)
        !          5089:        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          5090:        # Exported symbols can be pulled into shared objects from archives
        !          5091:        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
        !          5092:        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
        !          5093:        # This is similar to how AIX traditionally builds it's shared libraries.
        !          5094:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
        !          5095:       fi
        !          5096:     fi
        !          5097:     ;;
        !          5098:   chorus*)
        !          5099:     case $cc_basename in
        !          5100:       *)
        !          5101:        # FIXME: insert proper C++ library support
        !          5102:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5103:        ;;
        !          5104:     esac
        !          5105:     ;;
        !          5106:   dgux*)
        !          5107:     case $cc_basename in
        !          5108:       ec++)
        !          5109:        # FIXME: insert proper C++ library support
        !          5110:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5111:        ;;
        !          5112:       ghcx)
        !          5113:        # Green Hills C++ Compiler
        !          5114:        # FIXME: insert proper C++ library support
        !          5115:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5116:        ;;
        !          5117:       *)
        !          5118:        # FIXME: insert proper C++ library support
        !          5119:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5120:        ;;
        !          5121:     esac
        !          5122:     ;;
        !          5123:   freebsd[12]*)
        !          5124:     # C++ shared libraries reported to be fairly broken before switch to ELF
        !          5125:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5126:     ;;
        !          5127:   freebsd-elf*)
        !          5128:     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          5129:     ;;
        !          5130:   freebsd*)
        !          5131:     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
        !          5132:     # conventions
        !          5133:     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
        !          5134:     ;;
        !          5135:   gnu*)
        !          5136:     ;;
        !          5137:   hpux*)
        !          5138:     if test $with_gnu_ld = no; then
        !          5139:       if test "$host_cpu" = ia64; then
        !          5140:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          5141:       else
        !          5142:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
        !          5143:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5144:        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        !          5145:       fi
        !          5146:     fi
        !          5147:     if test "$host_cpu" = ia64; then
        !          5148:       _LT_AC_TAGVAR(hardcode_direct, $1)=no
        !          5149:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          5150:     else
        !          5151:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          5152:     fi
        !          5153:     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
        !          5154:                                            # but as the default
        !          5155:                                            # location of the library.
        !          5156:
        !          5157:     case $cc_basename in
        !          5158:       CC)
        !          5159:        # FIXME: insert proper C++ library support
        !          5160:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5161:        ;;
        !          5162:       aCC)
        !          5163:        case $host_os in
        !          5164:        hpux9*)
        !          5165:          _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        !          5166:          ;;
        !          5167:        *)
        !          5168:          if test "$host_cpu" = ia64; then
        !          5169:            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
        !          5170:          else
        !          5171:            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
        !          5172:          fi
        !          5173:          ;;
        !          5174:        esac
        !          5175:        # Commands to make compiler produce verbose output that lists
        !          5176:        # what "hidden" libraries, object files and flags are used when
        !          5177:        # linking a shared library.
        !          5178:        #
        !          5179:        # There doesn't appear to be a way to prevent this compiler from
        !          5180:        # explicitly linking system object files so we need to strip them
        !          5181:        # from the output so that they don't get included in the library
        !          5182:        # dependencies.
        !          5183:        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5184:        ;;
        !          5185:       *)
        !          5186:        if test "$GXX" = yes; then
        !          5187:          if test $with_gnu_ld = no; then
        !          5188:            case $host_os in
        !          5189:            hpux9*)
        !          5190:              _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        !          5191:              ;;
        !          5192:            *)
        !          5193:              if test "$host_cpu" = ia64; then
        !          5194:                _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
        !          5195:              else
        !          5196:                _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
        !          5197:              fi
        !          5198:              ;;
        !          5199:            esac
        !          5200:          fi
        !          5201:        else
        !          5202:          # FIXME: insert proper C++ library support
        !          5203:          _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5204:        fi
        !          5205:        ;;
        !          5206:     esac
        !          5207:     ;;
        !          5208:   irix5* | irix6*)
        !          5209:     case $cc_basename in
        !          5210:       CC)
        !          5211:        # SGI C++
        !          5212:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
        !          5213:
        !          5214:        # Archives containing C++ object files must be created using
        !          5215:        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
        !          5216:        # necessary to make sure instantiated templates are included
        !          5217:        # in the archive.
        !          5218:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
        !          5219:        ;;
        !          5220:       *)
        !          5221:        if test "$GXX" = yes; then
        !          5222:          if test "$with_gnu_ld" = no; then
        !          5223:            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
        !          5224:          else
        !          5225:            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
        !          5226:          fi
        !          5227:        fi
        !          5228:        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          5229:        ;;
        !          5230:     esac
        !          5231:     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          5232:     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5233:     ;;
        !          5234:   linux*)
        !          5235:     case $cc_basename in
        !          5236:       KCC)
        !          5237:        # Kuck and Associates, Inc. (KAI) C++ Compiler
        !          5238:
        !          5239:        # KCC will only create a shared library if the output file
        !          5240:        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        !          5241:        # to its proper name (with version) after linking.
        !          5242:        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
        !          5243:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
        !          5244:
        !          5245:        # Commands to make compiler produce verbose output that lists
        !          5246:        # what "hidden" libraries, object files and flags are used when
        !          5247:        # linking a shared library.
        !          5248:        #
        !          5249:        # There doesn't appear to be a way to prevent this compiler from
        !          5250:        # explicitly linking system object files so we need to strip them
        !          5251:        # from the output so that they don't get included in the library
        !          5252:        # dependencies.
        !          5253:        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5254:
        !          5255:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
        !          5256:        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
        !          5257:
        !          5258:        # Archives containing C++ object files must be created using
        !          5259:        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
        !          5260:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
        !          5261:        ;;
        !          5262:       cxx)
        !          5263:        # Compaq C++
        !          5264:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          5265:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
        !          5266:
        !          5267:        runpath_var=LD_RUN_PATH
        !          5268:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
        !          5269:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5270:
        !          5271:        # Commands to make compiler produce verbose output that lists
        !          5272:        # what "hidden" libraries, object files and flags are used when
        !          5273:        # linking a shared library.
        !          5274:        #
        !          5275:        # There doesn't appear to be a way to prevent this compiler from
        !          5276:        # explicitly linking system object files so we need to strip them
        !          5277:        # from the output so that they don't get included in the library
        !          5278:        # dependencies.
        !          5279:        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5280:        ;;
        !          5281:     esac
        !          5282:     ;;
        !          5283:   lynxos*)
        !          5284:     # FIXME: insert proper C++ library support
        !          5285:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5286:     ;;
        !          5287:   m88k*)
        !          5288:     # FIXME: insert proper C++ library support
        !          5289:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5290:     ;;
        !          5291:   mvs*)
        !          5292:     case $cc_basename in
        !          5293:       cxx)
        !          5294:        # FIXME: insert proper C++ library support
        !          5295:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5296:        ;;
        !          5297:       *)
        !          5298:        # FIXME: insert proper C++ library support
        !          5299:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5300:        ;;
        !          5301:     esac
        !          5302:     ;;
        !          5303:   netbsd*)
        !          5304:     # NetBSD uses g++ - do we need to do anything?
        !          5305:     ;;
        !          5306:   osf3*)
        !          5307:     case $cc_basename in
        !          5308:       KCC)
        !          5309:        # Kuck and Associates, Inc. (KAI) C++ Compiler
        !          5310:
        !          5311:        # KCC will only create a shared library if the output file
        !          5312:        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        !          5313:        # to its proper name (with version) after linking.
        !          5314:        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
        !          5315:
        !          5316:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        !          5317:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5318:
        !          5319:        # Archives containing C++ object files must be created using
        !          5320:        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
        !          5321:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
        !          5322:
        !          5323:        ;;
        !          5324:       RCC)
        !          5325:        # Rational C++ 2.4.1
        !          5326:        # FIXME: insert proper C++ library support
        !          5327:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5328:        ;;
        !          5329:       cxx)
        !          5330:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
        !          5331:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
        !          5332:
        !          5333:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          5334:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5335:
        !          5336:        # Commands to make compiler produce verbose output that lists
        !          5337:        # what "hidden" libraries, object files and flags are used when
        !          5338:        # linking a shared library.
        !          5339:        #
        !          5340:        # There doesn't appear to be a way to prevent this compiler from
        !          5341:        # explicitly linking system object files so we need to strip them
        !          5342:        # from the output so that they don't get included in the library
        !          5343:        # dependencies.
        !          5344:        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5345:        ;;
        !          5346:       *)
        !          5347:        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
        !          5348:          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
        !          5349:          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
        !          5350:
        !          5351:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          5352:          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5353:
        !          5354:          # Commands to make compiler produce verbose output that lists
        !          5355:          # what "hidden" libraries, object files and flags are used when
        !          5356:          # linking a shared library.
        !          5357:          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
        !          5358:
        !          5359:        else
        !          5360:          # FIXME: insert proper C++ library support
        !          5361:          _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5362:        fi
        !          5363:        ;;
        !          5364:     esac
        !          5365:     ;;
        !          5366:   osf4* | osf5*)
        !          5367:     case $cc_basename in
        !          5368:       KCC)
        !          5369:        # Kuck and Associates, Inc. (KAI) C++ Compiler
        !          5370:
        !          5371:        # KCC will only create a shared library if the output file
        !          5372:        # ends with ".so" (or ".sl" for HP-UX), so rename the library
        !          5373:        # to its proper name (with version) after linking.
        !          5374:        _LT_AC_TAGVAR(archive_cmds, $1)='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
        !          5375:
        !          5376:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        !          5377:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5378:
        !          5379:        # Archives containing C++ object files must be created using
        !          5380:        # the KAI C++ compiler.
        !          5381:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
        !          5382:        ;;
        !          5383:       RCC)
        !          5384:        # Rational C++ 2.4.1
        !          5385:        # FIXME: insert proper C++ library support
        !          5386:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5387:        ;;
        !          5388:       cxx)
        !          5389:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
        !          5390:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
        !          5391:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
        !          5392:          echo "-hidden">> $lib.exp~
        !          5393:          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
        !          5394:          $rm $lib.exp'
        !          5395:
        !          5396:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
        !          5397:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5398:
        !          5399:        # Commands to make compiler produce verbose output that lists
        !          5400:        # what "hidden" libraries, object files and flags are used when
        !          5401:        # linking a shared library.
        !          5402:        #
        !          5403:        # There doesn't appear to be a way to prevent this compiler from
        !          5404:        # explicitly linking system object files so we need to strip them
        !          5405:        # from the output so that they don't get included in the library
        !          5406:        # dependencies.
        !          5407:        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5408:        ;;
        !          5409:       *)
        !          5410:        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
        !          5411:          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
        !          5412:         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
        !          5413:
        !          5414:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          5415:          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          5416:
        !          5417:          # Commands to make compiler produce verbose output that lists
        !          5418:          # what "hidden" libraries, object files and flags are used when
        !          5419:          # linking a shared library.
        !          5420:          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
        !          5421:
        !          5422:        else
        !          5423:          # FIXME: insert proper C++ library support
        !          5424:          _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5425:        fi
        !          5426:        ;;
        !          5427:     esac
        !          5428:     ;;
        !          5429:   psos*)
        !          5430:     # FIXME: insert proper C++ library support
        !          5431:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5432:     ;;
        !          5433:   sco*)
        !          5434:     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          5435:     case $cc_basename in
        !          5436:       CC)
        !          5437:        # FIXME: insert proper C++ library support
        !          5438:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5439:        ;;
        !          5440:       *)
        !          5441:        # FIXME: insert proper C++ library support
        !          5442:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5443:        ;;
        !          5444:     esac
        !          5445:     ;;
        !          5446:   sunos4*)
        !          5447:     case $cc_basename in
        !          5448:       CC)
        !          5449:        # Sun C++ 4.x
        !          5450:        # FIXME: insert proper C++ library support
        !          5451:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5452:        ;;
        !          5453:       lcc)
        !          5454:        # Lucid
        !          5455:        # FIXME: insert proper C++ library support
        !          5456:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5457:        ;;
        !          5458:       *)
        !          5459:        # FIXME: insert proper C++ library support
        !          5460:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5461:        ;;
        !          5462:     esac
        !          5463:     ;;
        !          5464:   solaris*)
        !          5465:     case $cc_basename in
        !          5466:       CC)
        !          5467:        # Sun C++ 4.2, 5.x and Centerline C++
        !          5468:        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
        !          5469:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
        !          5470:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          5471:        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
        !          5472:
        !          5473:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          5474:        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          5475:        case $host_os in
        !          5476:          solaris2.[0-5] | solaris2.[0-5].*) ;;
        !          5477:          *)
        !          5478:            # The C++ compiler is used as linker so we must use $wl
        !          5479:            # flag to pass the commands to the underlying system
        !          5480:            # linker.
        !          5481:            # Supported since Solaris 2.6 (maybe 2.5.1?)
        !          5482:            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
        !          5483:            ;;
        !          5484:        esac
        !          5485:        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          5486:
        !          5487:        # Commands to make compiler produce verbose output that lists
        !          5488:        # what "hidden" libraries, object files and flags are used when
        !          5489:        # linking a shared library.
        !          5490:        #
        !          5491:        # There doesn't appear to be a way to prevent this compiler from
        !          5492:        # explicitly linking system object files so we need to strip them
        !          5493:        # from the output so that they don't get included in the library
        !          5494:        # dependencies.
        !          5495:        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
        !          5496:
        !          5497:        # Archives containing C++ object files must be created using
        !          5498:        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
        !          5499:        # necessary to make sure instantiated templates are included
        !          5500:        # in the archive.
        !          5501:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
        !          5502:        ;;
        !          5503:       gcx)
        !          5504:        # Green Hills C++ Compiler
        !          5505:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
        !          5506:
        !          5507:        # The C++ compiler must be used to create the archive.
        !          5508:        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
        !          5509:        ;;
        !          5510:       *)
        !          5511:        # GNU C++ compiler with Solaris linker
        !          5512:        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
        !          5513:          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
        !          5514:          if $CC --version | egrep -v '^2\.7' > /dev/null; then
        !          5515:            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
        !          5516:            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          5517:                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
        !          5518:
        !          5519:            # Commands to make compiler produce verbose output that lists
        !          5520:            # what "hidden" libraries, object files and flags are used when
        !          5521:            # linking a shared library.
        !          5522:            output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
        !          5523:          else
        !          5524:            # g++ 2.7 appears to require `-G' NOT `-shared' on this
        !          5525:            # platform.
        !          5526:            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
        !          5527:            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          5528:                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
        !          5529:
        !          5530:            # Commands to make compiler produce verbose output that lists
        !          5531:            # what "hidden" libraries, object files and flags are used when
        !          5532:            # linking a shared library.
        !          5533:            output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
        !          5534:          fi
        !          5535:
        !          5536:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
        !          5537:        fi
        !          5538:        ;;
        !          5539:     esac
        !          5540:     ;;
        !          5541:   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
        !          5542:     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          5543:     ;;
        !          5544:   tandem*)
        !          5545:     case $cc_basename in
        !          5546:       NCC)
        !          5547:        # NonStop-UX NCC 3.20
        !          5548:        # FIXME: insert proper C++ library support
        !          5549:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5550:        ;;
        !          5551:       *)
        !          5552:        # FIXME: insert proper C++ library support
        !          5553:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5554:        ;;
        !          5555:     esac
        !          5556:     ;;
        !          5557:   vxworks*)
        !          5558:     # FIXME: insert proper C++ library support
        !          5559:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5560:     ;;
        !          5561:   *)
        !          5562:     # FIXME: insert proper C++ library support
        !          5563:     _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          5564:     ;;
        !          5565: esac
        !          5566: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
        !          5567: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
        !          5568:
        !          5569: # Figure out "hidden" C++ library dependencies from verbose
        !          5570: # compiler output whening linking a shared library.
        !          5571: cat > conftest.$ac_ext <<EOF
        !          5572: class Foo
        !          5573: {
        !          5574: public:
        !          5575:   Foo (void) { a = 0; }
        !          5576: private:
        !          5577:   int a;
        !          5578: };
        !          5579: EOF
        !          5580:
        !          5581:
        !          5582: if AC_TRY_EVAL(ac_compile); then
        !          5583:   # Parse the compiler output and extract the necessary
        !          5584:   # objects, libraries and library flags.
        !          5585:
        !          5586:   # Sentinel used to keep track of whether or not we are before
        !          5587:   # the conftest object file.
        !          5588:   pre_test_object_deps_done=no
        !          5589:
        !          5590:   # The `*' in the case matches for architectures that use `case' in
        !          5591:   # $output_verbose_cmd can trigger glob expansion during the loop
        !          5592:   # eval without this substitution.
        !          5593:   output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
        !          5594:
        !          5595:   for p in `eval $output_verbose_link_cmd`; do
        !          5596:     case $p in
        !          5597:
        !          5598:     -L* | -R* | -l*)
        !          5599:        # Some compilers place space between "-{L,R}" and the path.
        !          5600:        # Remove the space.
        !          5601:        if test $p = "-L" \
        !          5602:          || test $p = "-R"; then
        !          5603:         prev=$p
        !          5604:         continue
        !          5605:        else
        !          5606:         prev=
        !          5607:        fi
        !          5608:
        !          5609:        if test "$pre_test_object_deps_done" = no; then
        !          5610:         case $p in
        !          5611:         -L* | -R*)
        !          5612:           # Internal compiler library paths should come after those
        !          5613:           # provided the user.  The postdeps already come after the
        !          5614:           # user supplied libs so there is no need to process them.
        !          5615:           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
        !          5616:             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
        !          5617:           else
        !          5618:             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
        !          5619:           fi
        !          5620:           ;;
        !          5621:         # The "-l" case would never come before the object being
        !          5622:         # linked, so don't bother handling this case.
        !          5623:         esac
        !          5624:        else
        !          5625:         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
        !          5626:           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
        !          5627:         else
        !          5628:           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
        !          5629:         fi
        !          5630:        fi
        !          5631:        ;;
        !          5632:
        !          5633:     *.$objext)
        !          5634:        # This assumes that the test object file only shows up
        !          5635:        # once in the compiler output.
        !          5636:        if test "$p" = "conftest.$objext"; then
        !          5637:         pre_test_object_deps_done=yes
        !          5638:         continue
        !          5639:        fi
        !          5640:
        !          5641:        if test "$pre_test_object_deps_done" = no; then
        !          5642:         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
        !          5643:           _LT_AC_TAGVAR(predep_objects, $1)="$p"
        !          5644:         else
        !          5645:           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
        !          5646:         fi
        !          5647:        else
        !          5648:         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
        !          5649:           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
        !          5650:         else
        !          5651:           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
        !          5652:         fi
        !          5653:        fi
        !          5654:        ;;
        !          5655:
        !          5656:     *) ;; # Ignore the rest.
        !          5657:
        !          5658:     esac
        !          5659:   done
        !          5660:
        !          5661:   # Clean up.
        !          5662:   rm -f a.out
        !          5663: else
        !          5664:   echo "libtool.m4: error: problem compiling C++ test program"
        !          5665: fi
        !          5666:
        !          5667: $rm -f confest.$objext
        !          5668:
        !          5669: case " $_LT_AC_TAGVAR(postdeps, $1) " in
        !          5670: *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
        !          5671: *) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
        !          5672: esac
        !          5673:
        !          5674: _LT_AC_TAGVAR(GCC, $1)="$GXX"
        !          5675: _LT_AC_TAGVAR(LD, $1)="$LD"
        !          5676:
        !          5677: AC_LIBTOOL_PROG_COMPILER_PIC($1)
        !          5678: AC_LIBTOOL_PROG_CC_C_O($1)
        !          5679: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
        !          5680: AC_LIBTOOL_PROG_LD_SHLIBS($1)
        !          5681: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
        !          5682: AC_LIBTOOL_SYS_LIB_STRIP
        !          5683: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
        !          5684: AC_LIBTOOL_DLOPEN_SELF($1)
        !          5685:
        !          5686: AC_LIBTOOL_CONFIG($1)
        !          5687:
        !          5688: AC_LANG_POP
        !          5689: CC="$lt_save_CC"
        !          5690: ])# AC_LIBTOOL_LANG_CXX_CONFIG
        !          5691:
        !          5692:
        !          5693: # AC_LIBTOOL_LANG_GCJ_CONFIG
        !          5694: # --------------------------
        !          5695: # Ensure that the configuration vars for the C compiler are
        !          5696: # suitably defined.  Those variables are subsequently used by
        !          5697: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
        !          5698: AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
        !          5699: AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
        !          5700: [AC_LANG_SAVE
        !          5701:
        !          5702: # Source file extension for C test sources.
        !          5703: ac_ext=java
        !          5704:
        !          5705: # Object file extension for compiled C test sources.
        !          5706: objext=o
        !          5707: _LT_AC_TAGVAR(objext, $1)=$objext
        !          5708:
        !          5709: # Code to be used in simple compile tests
        !          5710: lt_simple_compile_test_code="class foo {}"
        !          5711:
        !          5712: # Code to be used in simple link tests
        !          5713: lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
        !          5714:
        !          5715: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
        !          5716: _LT_AC_SYS_COMPILER
        !          5717:
        !          5718: # Allow CC to be a program name with arguments.
        !          5719: lt_save_CC="$CC"
        !          5720: CC=${GCJ-"gcj"}
        !          5721: set dummy $CC
        !          5722: compiler="[$]2"
        !          5723: _LT_AC_TAGVAR(compiler, $1)=$CC
        !          5724:
        !          5725: # GCJ did not exist at the time GCC didn't implicitly link libc in.
        !          5726: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          5727:
        !          5728: AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
        !          5729: AC_LIBTOOL_PROG_COMPILER_PIC($1)
        !          5730: AC_LIBTOOL_PROG_CC_C_O($1)
        !          5731: AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
        !          5732: AC_LIBTOOL_PROG_LD_SHLIBS($1)
        !          5733: AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
        !          5734: AC_LIBTOOL_SYS_LIB_STRIP
        !          5735: AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
        !          5736: AC_LIBTOOL_DLOPEN_SELF($1)
        !          5737:
        !          5738: AC_LIBTOOL_CONFIG($1)
        !          5739:
        !          5740: AC_LANG_RESTORE
        !          5741: CC="$lt_save_CC"
        !          5742: ])# AC_LIBTOOL_LANG_GCJ_CONFIG
        !          5743:
        !          5744:
        !          5745: # AC_LIBTOOL_LANG_RC_CONFIG
        !          5746: # --------------------------
        !          5747: # Ensure that the configuration vars for the Windows resource compiler are
        !          5748: # suitably defined.  Those variables are subsequently used by
        !          5749: # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
        !          5750: AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
        !          5751: AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
        !          5752: [AC_LANG_SAVE
        !          5753:
        !          5754: # Source file extension for RC test sources.
        !          5755: ac_ext=rc
        !          5756:
        !          5757: # Object file extension for compiled RC test sources.
        !          5758: objext=o
        !          5759: _LT_AC_TAGVAR(objext, $1)=$objext
        !          5760:
        !          5761: # Code to be used in simple compile tests
        !          5762: lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
        !          5763:
        !          5764: # Code to be used in simple link tests
        !          5765: lt_simple_link_test_code="$lt_simple_compile_test_code"
        !          5766:
        !          5767: # ltmain only uses $CC for tagged configurations so make sure $CC is set.
        !          5768: _LT_AC_SYS_COMPILER
        !          5769:
        !          5770: # Allow CC to be a program name with arguments.
        !          5771: lt_save_CC="$CC"
        !          5772: CC=${RC-"windres"}
        !          5773: set dummy $CC
        !          5774: compiler="[$]2"
        !          5775: _LT_AC_TAGVAR(compiler, $1)=$CC
        !          5776: _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
        !          5777:
        !          5778: AC_LIBTOOL_CONFIG($1)
        !          5779:
        !          5780: AC_LANG_RESTORE
        !          5781: CC="$lt_save_CC"
        !          5782: ])# AC_LIBTOOL_LANG_RC_CONFIG
        !          5783:
        !          5784:
        !          5785: # AC_LIBTOOL_CONFIG([TAGNAME])
        !          5786: # ----------------------------
        !          5787: # If TAGNAME is not passed, then create an initial libtool script
        !          5788: # with a default configuration from the untagged config vars.  Otherwise
        !          5789: # add code to config.status for appending the configuration named by
        !          5790: # TAGNAME from the matching tagged config vars.
        !          5791: AC_DEFUN([AC_LIBTOOL_CONFIG],
        !          5792: [# The else clause should only fire when bootstrapping the
        !          5793: # libtool distribution, otherwise you forgot to ship ltmain.sh
        !          5794: # with your package, and you will get complaints that there are
        !          5795: # no rules to generate ltmain.sh.
        !          5796: if test -f "$ltmain"; then
        !          5797:   # Now quote all the things that may contain metacharacters while being
        !          5798:   # careful not to overquote the AC_SUBSTed values.  We take copies of the
        !          5799:   # variables and quote the copies for generation of the libtool script.
        !          5800:   for var in echo old_CC old_CFLAGS AR AR_FLAGS RANLIB LN_S LTCC NM SHELL \
        !          5801:     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
        !          5802:     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
        !          5803:     deplibs_check_method reload_flag reload_cmds need_locks \
        !          5804:     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
        !          5805:     lt_cv_sys_global_symbol_to_c_name_address \
        !          5806:     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
        !          5807:     old_postinstall_cmds old_postuninstall_cmds \
        !          5808:     HOST_CC \
        !          5809:     _LT_AC_TAGVAR(compiler, $1) \
        !          5810:     _LT_AC_TAGVAR(CC, $1) \
        !          5811:     _LT_AC_TAGVAR(LD, $1) \
        !          5812:     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
        !          5813:     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
        !          5814:     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
        !          5815:     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
        !          5816:     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
        !          5817:     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
        !          5818:     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
        !          5819:     _LT_AC_TAGVAR(old_archive_cmds, $1) \
        !          5820:     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
        !          5821:     _LT_AC_TAGVAR(predep_objects, $1) \
        !          5822:     _LT_AC_TAGVAR(postdep_objects, $1) \
        !          5823:     _LT_AC_TAGVAR(predeps, $1) \
        !          5824:     _LT_AC_TAGVAR(postdeps, $1) \
        !          5825:     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
        !          5826:     _LT_AC_TAGVAR(archive_cmds, $1) \
        !          5827:     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
        !          5828:     _LT_AC_TAGVAR(postinstall_cmds, $1) \
        !          5829:     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
        !          5830:     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
        !          5831:     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
        !          5832:     _LT_AC_TAGVAR(no_undefined_flag, $1) \
        !          5833:     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
        !          5834:     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
        !          5835:     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
        !          5836:     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
        !          5837:     _LT_AC_TAGVAR(exclude_expsyms, $1) \
        !          5838:     _LT_AC_TAGVAR(include_expsyms, $1); do
        !          5839:
        !          5840:     case $var in
        !          5841:     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
        !          5842:     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
        !          5843:     _LT_AC_TAGVAR(archive_cmds, $1) | \
        !          5844:     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
        !          5845:     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
        !          5846:     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
        !          5847:     extract_expsyms_cmds | reload_cmds | finish_cmds | \
        !          5848:     postinstall_cmds | postuninstall_cmds | \
        !          5849:     old_postinstall_cmds | old_postuninstall_cmds | \
        !          5850:     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
        !          5851:       # Double-quote double-evaled strings.
        !          5852:       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
        !          5853:       ;;
        !          5854:     *)
        !          5855:       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
        !          5856:       ;;
        !          5857:     esac
        !          5858:   done
        !          5859:
        !          5860:   case $lt_echo in
        !          5861:   *'\[$]0 --fallback-echo"')
        !          5862:     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
        !          5863:     ;;
        !          5864:   esac
        !          5865:
        !          5866: ifelse([$1], [],
        !          5867:   [cfgfile="${ofile}T"
        !          5868:   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
        !          5869:   $rm -f "$cfgfile"
        !          5870:   AC_MSG_NOTICE([creating $ofile])],
        !          5871:   [cfgfile="$ofile"])
        !          5872:
        !          5873:   cat <<__EOF__ >> "$cfgfile"
        !          5874: ifelse([$1], [],
        !          5875: [#! $SHELL
        !          5876:
        !          5877: # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
        !          5878: # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
        !          5879: # NOTE: Changes made to this file will be lost: look at ltmain.sh.
        !          5880: #
        !          5881: # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
        !          5882: # Free Software Foundation, Inc.
        !          5883: #
        !          5884: # This file is part of GNU Libtool:
        !          5885: # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
        !          5886: #
        !          5887: # This program is free software; you can redistribute it and/or modify
        !          5888: # it under the terms of the GNU General Public License as published by
        !          5889: # the Free Software Foundation; either version 2 of the License, or
        !          5890: # (at your option) any later version.
        !          5891: #
        !          5892: # This program is distributed in the hope that it will be useful, but
        !          5893: # WITHOUT ANY WARRANTY; without even the implied warranty of
        !          5894: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        !          5895: # General Public License for more details.
        !          5896: #
        !          5897: # You should have received a copy of the GNU General Public License
        !          5898: # along with this program; if not, write to the Free Software
        !          5899: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
        !          5900: #
        !          5901: # As a special exception to the GNU General Public License, if you
        !          5902: # distribute this file as part of a program that contains a
        !          5903: # configuration script generated by Autoconf, you may include it under
        !          5904: # the same distribution terms that you use for the rest of that program.
        !          5905:
        !          5906: # Sed that helps us avoid accidentally triggering echo(1) options like -n.
        !          5907: Xsed="sed -e s/^X//"
        !          5908:
        !          5909: # The HP-UX ksh and POSIX shell print the target directory to stdout
        !          5910: # if CDPATH is set.
        !          5911: if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
        !          5912:
        !          5913: # The names of the tagged configurations supported by this script.
        !          5914: available_tags=
        !          5915:
        !          5916: # ### BEGIN LIBTOOL CONFIG],
        !          5917: [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
        !          5918:
        !          5919: # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
        !          5920:
        !          5921: # Shell to use when invoking shell scripts.
        !          5922: SHELL=$lt_SHELL
        !          5923:
        !          5924: # Whether or not to build shared libraries.
        !          5925: build_libtool_libs=$enable_shared
        !          5926:
        !          5927: # Whether or not to build static libraries.
        !          5928: build_old_libs=$enable_static
        !          5929:
        !          5930: # Whether or not to add -lc for building shared libraries.
        !          5931: build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
        !          5932:
        !          5933: # Whether or not to optimize for fast installation.
        !          5934: fast_install=$enable_fast_install
        !          5935:
        !          5936: # The host system.
        !          5937: host_alias=$host_alias
        !          5938: host=$host
        !          5939:
        !          5940: # An echo program that does not interpret backslashes.
        !          5941: echo=$lt_echo
        !          5942:
        !          5943: # The archiver.
        !          5944: AR=$lt_AR
        !          5945: AR_FLAGS=$lt_AR_FLAGS
        !          5946:
        !          5947: # A C compiler.
        !          5948: LTCC=$lt_LTCC
        !          5949:
        !          5950: # A C compiler for the build system.
        !          5951: HOST_CC=$lt_HOST_CC
        !          5952:
        !          5953: # A language-specific compiler.
        !          5954: CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
        !          5955:
        !          5956: # Is the compiler the GNU C compiler?
        !          5957: with_gcc=$_LT_AC_TAGVAR(GCC, $1)
        !          5958:
        !          5959: # The linker used to build libraries.
        !          5960: LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
        !          5961:
        !          5962: # Whether we need hard or soft links.
        !          5963: LN_S=$lt_LN_S
        !          5964:
        !          5965: # A BSD-compatible nm program.
        !          5966: NM=$lt_NM
        !          5967:
        !          5968: # A symbol stripping program
        !          5969: STRIP=$STRIP
        !          5970:
        !          5971: # Used to examine libraries when file_magic_cmd begins "file"
        !          5972: MAGIC_CMD=$MAGIC_CMD
        !          5973:
        !          5974: # Used on cygwin: DLL creation program.
        !          5975: DLLTOOL="$DLLTOOL"
        !          5976:
        !          5977: # Used on cygwin: object dumper.
        !          5978: OBJDUMP="$OBJDUMP"
        !          5979:
        !          5980: # Used on cygwin: assembler.
        !          5981: AS="$AS"
        !          5982:
        !          5983: # The name of the directory that contains temporary libtool files.
        !          5984: objdir=$objdir
        !          5985:
        !          5986: # How to create reloadable object files.
        !          5987: reload_flag=$lt_reload_flag
        !          5988: reload_cmds=$lt_reload_cmds
        !          5989:
        !          5990: # How to pass a linker flag through the compiler.
        !          5991: wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
        !          5992:
        !          5993: # Object file suffix (normally "o").
        !          5994: objext="$ac_objext"
        !          5995:
        !          5996: # Old archive suffix (normally "a").
        !          5997: libext="$libext"
        !          5998:
        !          5999: # Executable file suffix (normally "").
        !          6000: exeext="$exeext"
        !          6001:
        !          6002: # Additional compiler flags for building library objects.
        !          6003: pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
        !          6004: pic_mode=$pic_mode
        !          6005:
        !          6006: # What is the maximum length of a command?
        !          6007: max_cmd_len=$lt_cv_sys_max_cmd_len
        !          6008:
        !          6009: # Does compiler simultaneously support -c and -o options?
        !          6010: compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
        !          6011:
        !          6012: # Must we lock files when doing compilation ?
        !          6013: need_locks=$lt_need_locks
        !          6014:
        !          6015: # Do we need the lib prefix for modules?
        !          6016: need_lib_prefix=$need_lib_prefix
        !          6017:
        !          6018: # Do we need a version for libraries?
        !          6019: need_version=$need_version
        !          6020:
        !          6021: # Whether dlopen is supported.
        !          6022: dlopen_support=$enable_dlopen
        !          6023:
        !          6024: # Whether dlopen of programs is supported.
        !          6025: dlopen_self=$enable_dlopen_self
        !          6026:
        !          6027: # Whether dlopen of statically linked programs is supported.
        !          6028: dlopen_self_static=$enable_dlopen_self_static
        !          6029:
        !          6030: # Compiler flag to prevent dynamic linking.
        !          6031: link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
        !          6032:
        !          6033: # Compiler flag to turn off builtin functions.
        !          6034: no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
        !          6035:
        !          6036: # Compiler flag to allow reflexive dlopens.
        !          6037: export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
        !          6038:
        !          6039: # Compiler flag to generate shared objects directly from archives.
        !          6040: whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
        !          6041:
        !          6042: # Compiler flag to generate thread-safe objects.
        !          6043: thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
        !          6044:
        !          6045: # Library versioning type.
        !          6046: version_type=$version_type
        !          6047:
        !          6048: # Format of library name prefix.
        !          6049: libname_spec=$lt_libname_spec
        !          6050:
        !          6051: # List of archive names.  First name is the real one, the rest are links.
        !          6052: # The last name is the one that the linker finds with -lNAME.
        !          6053: library_names_spec=$lt_library_names_spec
        !          6054:
        !          6055: # The coded name of the library, if different from the real name.
        !          6056: soname_spec=$lt_soname_spec
        !          6057:
        !          6058: # Commands used to build and install an old-style archive.
        !          6059: RANLIB=$lt_RANLIB
        !          6060: old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
        !          6061: old_postinstall_cmds=$lt_old_postinstall_cmds
        !          6062: old_postuninstall_cmds=$lt_old_postuninstall_cmds
        !          6063:
        !          6064: # Create an old-style archive from a shared archive.
        !          6065: old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
        !          6066:
        !          6067: # Create a temporary old-style archive to link instead of a shared archive.
        !          6068: old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
        !          6069:
        !          6070: # Commands used to build and install a shared archive.
        !          6071: archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
        !          6072: archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
        !          6073: postinstall_cmds=$lt_postinstall_cmds
        !          6074: postuninstall_cmds=$lt_postuninstall_cmds
        !          6075:
        !          6076: # Commands to strip libraries.
        !          6077: old_striplib=$lt_old_striplib
        !          6078: striplib=$lt_striplib
        !          6079:
        !          6080: # Dependencies to place before the objects being linked to create a
        !          6081: # shared library.
        !          6082: predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
        !          6083:
        !          6084: # Dependencies to place after the objects being linked to create a
        !          6085: # shared library.
        !          6086: postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
        !          6087:
        !          6088: # Dependencies to place before the objects being linked to create a
        !          6089: # shared library.
        !          6090: predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
        !          6091:
        !          6092: # Dependencies to place after the objects being linked to create a
        !          6093: # shared library.
        !          6094: postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
        !          6095:
        !          6096: # The library search path used internally by the compiler when linking
        !          6097: # a shared library.
        !          6098: compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
        !          6099:
        !          6100: # Method to check whether dependent libraries are shared objects.
        !          6101: deplibs_check_method=$lt_deplibs_check_method
        !          6102:
        !          6103: # Command to use when deplibs_check_method == file_magic.
        !          6104: file_magic_cmd=$lt_file_magic_cmd
        !          6105:
        !          6106: # Flag that allows shared libraries with undefined symbols to be built.
        !          6107: allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
        !          6108:
        !          6109: # Flag that forces no undefined symbols.
        !          6110: no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
        !          6111:
        !          6112: # Commands used to finish a libtool library installation in a directory.
        !          6113: finish_cmds=$lt_finish_cmds
        !          6114:
        !          6115: # Same as above, but a single script fragment to be evaled but not shown.
        !          6116: finish_eval=$lt_finish_eval
        !          6117:
        !          6118: # Take the output of nm and produce a listing of raw symbols and C names.
        !          6119: global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
        !          6120:
        !          6121: # Transform the output of nm in a proper C declaration
        !          6122: global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
        !          6123:
        !          6124: # Transform the output of nm in a C name address pair
        !          6125: global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
        !          6126:
        !          6127: # This is the shared library runtime path variable.
        !          6128: runpath_var=$runpath_var
        !          6129:
        !          6130: # This is the shared library path variable.
        !          6131: shlibpath_var=$shlibpath_var
        !          6132:
        !          6133: # Is shlibpath searched before the hard-coded library search path?
        !          6134: shlibpath_overrides_runpath=$shlibpath_overrides_runpath
        !          6135:
        !          6136: # How to hardcode a shared library path into an executable.
        !          6137: hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
1.1       maekawa  6138:
1.1.1.3 ! ohara    6139: # Whether we should hardcode library paths into libraries.
        !          6140: hardcode_into_libs=$hardcode_into_libs
1.1       maekawa  6141:
1.1.1.3 ! ohara    6142: # Flag to hardcode \$libdir into a binary during linking.
        !          6143: # This must work even if \$libdir does not exist.
        !          6144: hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
        !          6145:
        !          6146: # Whether we need a single -rpath flag with a separated argument.
        !          6147: hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
        !          6148:
        !          6149: # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
        !          6150: # resulting binary.
        !          6151: hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
        !          6152:
        !          6153: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
        !          6154: # resulting binary.
        !          6155: hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
        !          6156:
        !          6157: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
        !          6158: # the resulting binary.
        !          6159: hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
        !          6160:
        !          6161: # Variables whose values should be saved in libtool wrapper scripts and
        !          6162: # restored at relink time.
        !          6163: variables_saved_for_relink="$variables_saved_for_relink"
        !          6164:
        !          6165: # Whether libtool must link a program against all its dependency libraries.
        !          6166: link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
        !          6167:
        !          6168: # Compile-time system search path for libraries
        !          6169: sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
        !          6170:
        !          6171: # Run-time system search path for libraries
        !          6172: sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
        !          6173:
        !          6174: # Fix the shell variable \$srcfile for the compiler.
        !          6175: fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
        !          6176:
        !          6177: # Set to yes if exported symbols are required.
        !          6178: always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
        !          6179:
        !          6180: # The commands to list exported symbols.
        !          6181: export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
        !          6182:
        !          6183: # The commands to extract the exported symbol list from a shared archive.
        !          6184: extract_expsyms_cmds=$lt_extract_expsyms_cmds
        !          6185:
        !          6186: # Symbols that should not be listed in the preloaded symbols.
        !          6187: exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
        !          6188:
        !          6189: # Symbols that must always be exported.
        !          6190: include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
        !          6191:
        !          6192: ifelse([$1],[],
        !          6193: [# ### END LIBTOOL CONFIG],
        !          6194: [# ### END LIBTOOL TAG CONFIG: $tagname])
        !          6195:
        !          6196: __EOF__
        !          6197:
        !          6198: ifelse([$1],[], [
        !          6199:   case $host_os in
        !          6200:   aix3*)
        !          6201:     cat <<\EOF >> "$cfgfile"
        !          6202:
        !          6203: # AIX sometimes has problems with the GCC collect2 program.  For some
        !          6204: # reason, if we set the COLLECT_NAMES environment variable, the problems
        !          6205: # vanish in a puff of smoke.
        !          6206: if test "X${COLLECT_NAMES+set}" != Xset; then
        !          6207:   COLLECT_NAMES=
        !          6208:   export COLLECT_NAMES
        !          6209: fi
        !          6210: EOF
        !          6211:     ;;
        !          6212:
        !          6213:   cygwin* | mingw* | pw32* | os2*)
        !          6214:     cat <<'EOF' >> "$cfgfile"
        !          6215:     # This is a source program that is used to create dlls on Windows
        !          6216:     # Don't remove nor modify the starting and closing comments
        !          6217:     _LT_AC_FILE_LTDLL_C
        !          6218:     # This is a source program that is used to create import libraries
        !          6219:     # on Windows for dlls which lack them. Don't remove nor modify the
        !          6220:     # starting and closing comments
        !          6221:     _LT_AC_FILE_IMPGEN_C
        !          6222: EOF
        !          6223:     ;;
        !          6224:   esac
        !          6225:
        !          6226:   # We use sed instead of cat because bash on DJGPP gets confused if
        !          6227:   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
        !          6228:   # text mode, it properly converts lines to CR/LF.  This bash problem
        !          6229:   # is reportedly fixed, but why not run on old versions too?
        !          6230:   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
        !          6231:
        !          6232:   mv -f "$cfgfile" "$ofile" || \
        !          6233:     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
        !          6234:   chmod +x "$ofile"
        !          6235: ])
        !          6236: else
        !          6237:   # If there is no Makefile yet, we rely on a make rule to execute
        !          6238:   # `config.status --recheck' to rerun these tests and create the
        !          6239:   # libtool script then.
        !          6240:   test -f Makefile && make "$ltmain"
        !          6241: fi
        !          6242: ])# AC_LIBTOOL_CONFIG
        !          6243:
        !          6244:
        !          6245: # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
        !          6246: # -------------------------------------------
        !          6247: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
        !          6248: [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
        !          6249:
        !          6250: _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
        !          6251:
        !          6252: if test "$GCC" = yes; then
        !          6253:   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
        !          6254:
        !          6255:   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
        !          6256:     lt_cv_prog_compiler_rtti_exceptions,
        !          6257:     [-fno-rtti -fno-exceptions -c conftest.$ac_ext], [],
        !          6258:     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
        !          6259: fi
        !          6260: ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
        !          6261:
        !          6262:
        !          6263: # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
        !          6264: # ---------------------------------
        !          6265: AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
        !          6266: [AC_REQUIRE([AC_CANONICAL_HOST])
        !          6267: AC_REQUIRE([AC_PROG_NM])
        !          6268: AC_REQUIRE([AC_OBJEXT])
        !          6269: # Check for command to grab the raw symbol name followed by C symbol from nm.
        !          6270: AC_MSG_CHECKING([command to parse $NM output from $compiler object])
        !          6271: AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
        !          6272: [
        !          6273: # These are sane defaults that work on at least a few old systems.
        !          6274: # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
        !          6275:
        !          6276: # Character class describing NM global symbol codes.
        !          6277: symcode='[[BCDEGRST]]'
        !          6278:
        !          6279: # Regexp to match symbols that can be accessed directly from C.
        !          6280: sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
        !          6281:
        !          6282: # Transform the above into a raw symbol and a C symbol.
        !          6283: symxfrm='\1 \2\3 \3'
        !          6284:
        !          6285: # Transform an extracted symbol line into a proper C declaration
        !          6286: lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
        !          6287:
        !          6288: # Transform an extracted symbol line into symbol name and symbol address
        !          6289: lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
        !          6290:
        !          6291: # Define system-specific variables.
        !          6292: case $host_os in
        !          6293: aix*)
        !          6294:   symcode='[[BCDT]]'
        !          6295:   ;;
        !          6296: cygwin* | mingw* | pw32*)
        !          6297:   symcode='[[ABCDGISTW]]'
        !          6298:   ;;
        !          6299: hpux*) # Its linker distinguishes data from code symbols
        !          6300:   if test "$host_cpu" = ia64; then
        !          6301:     symcode='[[ABCDEGRST]]'
        !          6302:   fi
        !          6303:   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
        !          6304:   lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
        !          6305:   ;;
        !          6306: irix*)
        !          6307:   symcode='[[BCDEGRST]]'
        !          6308:   ;;
        !          6309: solaris* | sysv5*)
        !          6310:   symcode='[[BDT]]'
        !          6311:   ;;
        !          6312: sysv4)
        !          6313:   symcode='[[DFNSTU]]'
        !          6314:   ;;
        !          6315: esac
        !          6316:
        !          6317: # Handle CRLF in mingw tool chain
        !          6318: opt_cr=
        !          6319: case $host_os in
        !          6320: mingw*)
        !          6321:   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
        !          6322:   ;;
        !          6323: esac
        !          6324:
        !          6325: # If we're using GNU nm, then use its standard symbol codes.
        !          6326: if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
        !          6327:   symcode='[[ABCDGISTW]]'
        !          6328: fi
        !          6329:
        !          6330: # Try without a prefix undercore, then with it.
        !          6331: for ac_symprfx in "" "_"; do
        !          6332:
        !          6333:   # Write the raw and C identifiers.
        !          6334:   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
        !          6335:
        !          6336:   # Check to see that the pipe works correctly.
        !          6337:   pipe_works=no
        !          6338:
        !          6339:   rm -f conftest*
        !          6340:   cat > conftest.$ac_ext <<EOF
        !          6341: #ifdef __cplusplus
        !          6342: extern "C" {
        !          6343: #endif
        !          6344: char nm_test_var;
        !          6345: void nm_test_func(){}
        !          6346: #ifdef __cplusplus
        !          6347: }
        !          6348: #endif
        !          6349: int main(){nm_test_var='a';nm_test_func();return(0);}
        !          6350: EOF
        !          6351:
        !          6352:   if AC_TRY_EVAL(ac_compile); then
        !          6353:     # Now try to grab the symbols.
        !          6354:     nlist=conftest.nm
        !          6355:     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
        !          6356:       # Try sorting and uniquifying the output.
        !          6357:       if sort "$nlist" | uniq > "$nlist"T; then
        !          6358:        mv -f "$nlist"T "$nlist"
        !          6359:       else
        !          6360:        rm -f "$nlist"T
        !          6361:       fi
        !          6362:
        !          6363:       # Make sure that we snagged all the symbols we need.
        !          6364:       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
        !          6365:        if egrep ' nm_test_func$' "$nlist" >/dev/null; then
        !          6366:          cat <<EOF > conftest.$ac_ext
        !          6367: #ifdef __cplusplus
        !          6368: extern "C" {
        !          6369: #endif
        !          6370:
        !          6371: EOF
        !          6372:          # Now generate the symbol file.
        !          6373:          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
        !          6374:
        !          6375:          cat <<EOF >> conftest.$ac_ext
        !          6376: #if defined (__STDC__) && __STDC__
        !          6377: # define lt_ptr_t void *
        !          6378: #else
        !          6379: # define lt_ptr_t char *
        !          6380: # define const
        !          6381: #endif
        !          6382:
        !          6383: /* The mapping between symbol names and symbols. */
        !          6384: const struct {
        !          6385:   const char *name;
        !          6386:   lt_ptr_t address;
        !          6387: }
        !          6388: lt_preloaded_symbols[[]] =
        !          6389: {
        !          6390: EOF
        !          6391:          sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
        !          6392:          cat <<\EOF >> conftest.$ac_ext
        !          6393:   {0, (lt_ptr_t) 0}
        !          6394: };
        !          6395:
        !          6396: #ifdef __cplusplus
        !          6397: }
        !          6398: #endif
        !          6399: EOF
        !          6400:          # Now try linking the two files.
        !          6401:          mv conftest.$ac_objext conftstm.$ac_objext
        !          6402:          lt_save_LIBS="$LIBS"
        !          6403:          lt_save_CFLAGS="$CFLAGS"
        !          6404:          LIBS="conftstm.$ac_objext"
        !          6405:          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
        !          6406:          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
        !          6407:            pipe_works=yes
        !          6408:          fi
        !          6409:          LIBS="$lt_save_LIBS"
        !          6410:          CFLAGS="$lt_save_CFLAGS"
        !          6411:        else
        !          6412:          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
        !          6413:        fi
        !          6414:       else
        !          6415:        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
        !          6416:       fi
        !          6417:     else
        !          6418:       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
        !          6419:     fi
        !          6420:   else
        !          6421:     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
        !          6422:     cat conftest.$ac_ext >&5
        !          6423:   fi
        !          6424:   rm -f conftest* conftst*
        !          6425:
        !          6426:   # Do not use the global_symbol_pipe unless it works.
        !          6427:   if test "$pipe_works" = yes; then
        !          6428:     break
        !          6429:   else
        !          6430:     lt_cv_sys_global_symbol_pipe=
        !          6431:   fi
        !          6432: done
        !          6433: ])
        !          6434: if test -z "$lt_cv_sys_global_symbol_pipe"; then
        !          6435:   lt_cv_sys_global_symbol_to_cdecl=
        !          6436: fi
        !          6437: if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
        !          6438:   AC_MSG_RESULT(failed)
        !          6439: else
        !          6440:   AC_MSG_RESULT(ok)
        !          6441: fi
        !          6442: ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
        !          6443:
        !          6444:
        !          6445: # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
        !          6446: # ---------------------------------------
        !          6447: AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
        !          6448: [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
        !          6449: _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6450: _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
        !          6451:
        !          6452: AC_MSG_CHECKING([for $compiler option to produce PIC])
        !          6453:  ifelse([$1],[CXX],[
        !          6454:   # C++ specific cases for pic, static, wl, etc.
        !          6455:   if test "$GXX" = yes; then
        !          6456:     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6457:     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
        !          6458:
        !          6459:     case $host_os in
        !          6460:     aix*)
        !          6461:       # All AIX code is PIC.
        !          6462:       if test "$host_cpu" = ia64; then
        !          6463:        # AIX 5 now supports IA64 processor
        !          6464:        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6465:       fi
        !          6466:       ;;
        !          6467:     amigaos*)
        !          6468:       # FIXME: we need at least 68020 code to build shared libraries, but
        !          6469:       # adding the `-m68020' flag to GCC prevents building anything better,
        !          6470:       # like `-m68040'.
        !          6471:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
        !          6472:       ;;
        !          6473:     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
        !          6474:       # PIC is the default for these OSes.
        !          6475:       ;;
        !          6476:     cygwin* | mingw* | os2*)
        !          6477:       # This hack is so that the source file can tell whether it is being
        !          6478:       # built for inclusion in a dll (and should export symbols for example).
        !          6479:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
        !          6480:       ;;
        !          6481:     darwin* | rhapsody*)
        !          6482:       # PIC is the default on this platform
        !          6483:       # Common symbols not allowed in MH_DYLIB files
        !          6484:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
        !          6485:       ;;
        !          6486:     *djgpp*)
        !          6487:       # DJGPP does not support shared libraries at all
        !          6488:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6489:       ;;
        !          6490:     sysv4*MP*)
        !          6491:       if test -d /usr/nec; then
        !          6492:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
        !          6493:       fi
        !          6494:       ;;
        !          6495:     hpux*)
        !          6496:       # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
        !          6497:       if test "$host_cpu" != ia64; then
        !          6498:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6499:       fi
        !          6500:       ;;
        !          6501:     *)
        !          6502:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6503:       ;;
        !          6504:     esac
        !          6505:   else
        !          6506:     case $host_os in
        !          6507:       aix4* | aix5*)
        !          6508:        # All AIX code is PIC.
        !          6509:        if test "$host_cpu" = ia64; then
        !          6510:          # AIX 5 now supports IA64 processor
        !          6511:          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6512:        else
        !          6513:          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
        !          6514:        fi
        !          6515:        ;;
        !          6516:       chorus*)
        !          6517:        case $cc_basename in
        !          6518:        cxch68)
        !          6519:          # Green Hills C++ Compiler
        !          6520:          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
        !          6521:          ;;
        !          6522:        esac
        !          6523:        ;;
        !          6524:       dgux*)
        !          6525:        case $cc_basename in
        !          6526:          ec++)
        !          6527:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6528:            ;;
        !          6529:          ghcx)
        !          6530:            # Green Hills C++ Compiler
        !          6531:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
        !          6532:            ;;
        !          6533:          *)
        !          6534:            ;;
        !          6535:        esac
        !          6536:        ;;
        !          6537:       freebsd*)
        !          6538:        # FreeBSD uses GNU C++
        !          6539:        ;;
        !          6540:       hpux9* | hpux10* | hpux11*)
        !          6541:        case $cc_basename in
        !          6542:          CC)
        !          6543:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6544:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
        !          6545:            if test "$host_cpu" != ia64; then
        !          6546:              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
        !          6547:            fi
        !          6548:            ;;
        !          6549:          aCC)
        !          6550:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6551:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
        !          6552:            if test "$host_cpu" != ia64; then
        !          6553:              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
        !          6554:            fi
        !          6555:            ;;
        !          6556:          *)
        !          6557:            ;;
        !          6558:        esac
        !          6559:        ;;
        !          6560:       irix5* | irix6*)
        !          6561:        case $cc_basename in
        !          6562:          CC)
        !          6563:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6564:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        !          6565:            # CC pic flag -KPIC is the default.
        !          6566:            ;;
        !          6567:          *)
        !          6568:            ;;
        !          6569:        esac
        !          6570:        ;;
        !          6571:       linux*)
        !          6572:        case $cc_basename in
        !          6573:          KCC)
        !          6574:            # KAI C++ Compiler
        !          6575:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
        !          6576:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6577:            ;;
        !          6578:          cxx)
        !          6579:            # Compaq C++
        !          6580:            # Make sure the PIC flag is empty.  It appears that all Alpha
        !          6581:            # Linux and Compaq Tru64 Unix objects are PIC.
        !          6582:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6583:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        !          6584:            ;;
        !          6585:          *)
        !          6586:            ;;
        !          6587:        esac
        !          6588:        ;;
        !          6589:       lynxos*)
        !          6590:        ;;
        !          6591:       m88k*)
        !          6592:        ;;
        !          6593:       mvs*)
        !          6594:        case $cc_basename in
        !          6595:          cxx)
        !          6596:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
        !          6597:            ;;
        !          6598:          *)
        !          6599:            ;;
        !          6600:        esac
        !          6601:        ;;
        !          6602:       netbsd*)
        !          6603:        ;;
        !          6604:       osf3* | osf4* | osf5*)
        !          6605:        case $cc_basename in
        !          6606:          KCC)
        !          6607:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
        !          6608:            ;;
        !          6609:          RCC)
        !          6610:            # Rational C++ 2.4.1
        !          6611:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
        !          6612:            ;;
        !          6613:          cxx)
        !          6614:            # Digital/Compaq C++
        !          6615:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6616:            # Make sure the PIC flag is empty.  It appears that all Alpha
        !          6617:            # Linux and Compaq Tru64 Unix objects are PIC.
        !          6618:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6619:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        !          6620:            ;;
        !          6621:          *)
        !          6622:            ;;
        !          6623:        esac
        !          6624:        ;;
        !          6625:       psos*)
        !          6626:        ;;
        !          6627:       sco*)
        !          6628:        case $cc_basename in
        !          6629:          CC)
        !          6630:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6631:            ;;
        !          6632:          *)
        !          6633:            ;;
        !          6634:        esac
        !          6635:        ;;
        !          6636:       solaris*)
        !          6637:        case $cc_basename in
        !          6638:          CC)
        !          6639:            # Sun C++ 4.2, 5.x and Centerline C++
        !          6640:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6641:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6642:            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
        !          6643:            ;;
        !          6644:          gcx)
        !          6645:            # Green Hills C++ Compiler
        !          6646:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
        !          6647:            ;;
        !          6648:          *)
        !          6649:            ;;
        !          6650:        esac
        !          6651:        ;;
        !          6652:       sunos4*)
        !          6653:        case $cc_basename in
        !          6654:          CC)
        !          6655:            # Sun C++ 4.x
        !          6656:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
        !          6657:            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6658:            ;;
        !          6659:          lcc)
        !          6660:            # Lucid
        !          6661:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
        !          6662:            ;;
        !          6663:          *)
        !          6664:            ;;
        !          6665:        esac
        !          6666:        ;;
        !          6667:       tandem*)
        !          6668:        case $cc_basename in
        !          6669:          NCC)
        !          6670:            # NonStop-UX NCC 3.20
        !          6671:            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6672:            ;;
        !          6673:          *)
        !          6674:            ;;
        !          6675:        esac
        !          6676:        ;;
        !          6677:       unixware*)
        !          6678:        ;;
        !          6679:       vxworks*)
        !          6680:        ;;
        !          6681:       *)
        !          6682:        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
        !          6683:        ;;
        !          6684:     esac
        !          6685:   fi
        !          6686: ],
        !          6687: [
        !          6688:   if test "$GCC" = yes; then
        !          6689:     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6690:     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
        !          6691:
        !          6692:     case $host_os in
        !          6693:       aix*)
        !          6694:       # All AIX code is PIC.
        !          6695:       if test "$host_cpu" = ia64; then
        !          6696:        # AIX 5 now supports IA64 processor
        !          6697:        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6698:       fi
        !          6699:       ;;
        !          6700:
        !          6701:     amigaos*)
        !          6702:       # FIXME: we need at least 68020 code to build shared libraries, but
        !          6703:       # adding the `-m68020' flag to GCC prevents building anything better,
        !          6704:       # like `-m68040'.
        !          6705:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
        !          6706:       ;;
        !          6707:
        !          6708:     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
        !          6709:       # PIC is the default for these OSes.
        !          6710:       ;;
        !          6711:
        !          6712:     cygwin* | mingw* | pw32* | os2*)
        !          6713:       # This hack is so that the source file can tell whether it is being
        !          6714:       # built for inclusion in a dll (and should export symbols for example).
        !          6715:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
        !          6716:       ;;
        !          6717:
        !          6718:     darwin* | rhapsody*)
        !          6719:       # PIC is the default on this platform
        !          6720:       # Common symbols not allowed in MH_DYLIB files
        !          6721:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
        !          6722:       ;;
        !          6723:
        !          6724:     msdosdjgpp*)
        !          6725:       # Just because we use GCC doesn't mean we suddenly get shared libraries
        !          6726:       # on systems that don't support them.
        !          6727:       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
        !          6728:       enable_shared=no
        !          6729:       ;;
        !          6730:
        !          6731:     sysv4*MP*)
        !          6732:       if test -d /usr/nec; then
        !          6733:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
        !          6734:       fi
        !          6735:       ;;
        !          6736:
        !          6737:     hpux*)
        !          6738:       # PIC is the default for IA64 HP-UX, but not for PA HP-UX.
        !          6739:       if test "$host_cpu" != ia64; then
        !          6740:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6741:       fi
        !          6742:       ;;
        !          6743:
        !          6744:     *)
        !          6745:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
        !          6746:       ;;
        !          6747:     esac
        !          6748:   else
        !          6749:     # PORTME Check for flag to pass linker flags through the system compiler.
        !          6750:     case $host_os in
        !          6751:     aix*)
        !          6752:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6753:       if test "$host_cpu" = ia64; then
        !          6754:        # AIX 5 now supports IA64 processor
        !          6755:        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6756:       else
        !          6757:        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
        !          6758:       fi
        !          6759:       ;;
        !          6760:
        !          6761:     cygwin* | mingw* | pw32* | os2*)
        !          6762:       # This hack is so that the source file can tell whether it is being
        !          6763:       # built for inclusion in a dll (and should export symbols for example).
        !          6764:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
        !          6765:       ;;
        !          6766:
        !          6767:     hpux9* | hpux10* | hpux11*)
        !          6768:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6769:       if test "$host_cpu" != ia64; then
        !          6770:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
        !          6771:       fi
        !          6772:       # Is there a better lt_prog_compiler_static that works with the bundled CC?
        !          6773:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
        !          6774:       ;;
        !          6775:
        !          6776:     irix5* | irix6*)
        !          6777:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6778:       # PIC (with -KPIC) is the default.
        !          6779:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        !          6780:       ;;
        !          6781:
        !          6782:     newsos6)
        !          6783:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6784:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6785:       ;;
        !          6786:
        !          6787:     osf3* | osf4* | osf5*)
        !          6788:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6789:       # All OSF/1 code is PIC.
        !          6790:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
        !          6791:       ;;
        !          6792:
        !          6793:     sco3.2v5*)
        !          6794:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
        !          6795:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
        !          6796:       ;;
        !          6797:
        !          6798:     solaris*)
        !          6799:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6800:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6801:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6802:       ;;
        !          6803:
        !          6804:     sunos4*)
        !          6805:       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
        !          6806:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
        !          6807:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6808:       ;;
        !          6809:
        !          6810:     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
        !          6811:       if test "x$host_vendor" = xsni; then
        !          6812:        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-LD'
        !          6813:       else
        !          6814:        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
        !          6815:       fi
        !          6816:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        !          6817:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6818:       ;;
        !          6819:
        !          6820:     sysv4*MP*)
        !          6821:       if test -d /usr/nec ;then
        !          6822:        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
        !          6823:        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6824:       fi
        !          6825:       ;;
        !          6826:
        !          6827:     uts4*)
        !          6828:       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
        !          6829:       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
        !          6830:       ;;
        !          6831:
        !          6832:     *)
        !          6833:       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
        !          6834:       ;;
        !          6835:     esac
        !          6836:   fi
        !          6837: ])
        !          6838: AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
        !          6839:
        !          6840: #
        !          6841: # Check to make sure the PIC flag actually works.
        !          6842: #
        !          6843: if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
        !          6844:   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
        !          6845:     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
        !          6846:     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC], [],
        !          6847:     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
        !          6848:      "" | " "*) ;;
        !          6849:      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
        !          6850:      esac],
        !          6851:     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6852:      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
        !          6853: fi
        !          6854: case "$host_os" in
        !          6855:   # For platforms which do not support PIC, -DPIC is meaningless:
        !          6856:   *djgpp*)
        !          6857:     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
        !          6858:     ;;
        !          6859:   *)
        !          6860:     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) -DPIC"
        !          6861:     ;;
        !          6862: esac
        !          6863: ])
        !          6864:
        !          6865:
        !          6866: # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
        !          6867: # ------------------------------------
        !          6868: # See if the linker supports building shared libraries.
        !          6869: AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
        !          6870: [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
        !          6871: ifelse([$1],[CXX],[
        !          6872:   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
        !          6873:   case $host_os in
        !          6874:   aix4* | aix5*)
        !          6875:     # If we're using GNU nm, then we don't want the "-C" option.
        !          6876:     # -C means demangle to AIX nm, but means don't demangle with GNU nm
        !          6877:     if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
        !          6878:       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
        !          6879:     else
        !          6880:       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
        !          6881:     fi
        !          6882:     ;;
        !          6883:   cygwin* | mingw* | pw32*)
        !          6884:     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
        !          6885:   ;;
        !          6886:   *)
        !          6887:     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
        !          6888:   ;;
        !          6889:   esac
        !          6890: ],[
        !          6891:   runpath_var=
        !          6892:   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
        !          6893:
        !          6894:   _LT_AC_TAGVAR(archive_cmds, $1)=
        !          6895:   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=
        !          6896:   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
        !          6897:   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
        !          6898:   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
        !          6899:   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
        !          6900:   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
        !          6901:   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
        !          6902:   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
        !          6903:   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
        !          6904:   _LT_AC_TAGVAR(hardcode_direct, $1)=no
        !          6905:   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
        !          6906:   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
        !          6907:   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
        !          6908:   _LT_AC_TAGVAR(always_export_symbols, $1)=no
        !          6909:   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
        !          6910:   # include_expsyms should be a list of space-separated symbols to be *always*
        !          6911:   # included in the symbol list
        !          6912:   _LT_AC_TAGVAR(include_expsyms, $1)=
        !          6913:   # exclude_expsyms can be an egrep regular expression of symbols to exclude
        !          6914:   # it will be wrapped by ` (' and `)$', so one must not match beginning or
        !          6915:   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
        !          6916:   # as well as any symbol that contains `d'.
        !          6917:   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
        !          6918:   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
        !          6919:   # platforms (ab)use it in PIC code, but their linkers get confused if
        !          6920:   # the symbol is explicitly referenced.  Since portable code cannot
        !          6921:   # rely on this symbol name, it's probably fine to never include it in
        !          6922:   # preloaded symbol tables.
        !          6923:   extract_expsyms_cmds=
        !          6924:
        !          6925:   case $host_os in
        !          6926:   cygwin* | mingw* | pw32*)
        !          6927:     # FIXME: the MSVC++ port hasn't been tested in a loooong time
        !          6928:     # When not using gcc, we currently assume that we are using
        !          6929:     # Microsoft Visual C++.
        !          6930:     if test "$GCC" != yes; then
        !          6931:       with_gnu_ld=no
        !          6932:     fi
        !          6933:     ;;
        !          6934:   openbsd*)
        !          6935:     with_gnu_ld=no
        !          6936:     ;;
        !          6937:   esac
        !          6938:
        !          6939:   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
        !          6940:   if test "$with_gnu_ld" = yes; then
        !          6941:     # If archive_cmds runs LD, not CC, wlarc should be empty
        !          6942:     wlarc='${wl}'
        !          6943:
        !          6944:     # See if GNU ld supports shared libraries.
        !          6945:     case $host_os in
        !          6946:     aix3* | aix4* | aix5*)
        !          6947:       # On AIX/PPC, the GNU linker is very broken
        !          6948:       if test "$host_cpu" != ia64; then
        !          6949:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          6950:        cat <<EOF 1>&2
        !          6951:
        !          6952: *** Warning: the GNU linker, at least up to release 2.9.1, is reported
        !          6953: *** to be unable to reliably create shared libraries on AIX.
        !          6954: *** Therefore, libtool is disabling shared libraries support.  If you
        !          6955: *** really care for shared libraries, you may want to modify your PATH
        !          6956: *** so that a non-GNU linker is found, and then restart.
        !          6957:
        !          6958: EOF
        !          6959:       fi
        !          6960:       ;;
        !          6961:
        !          6962:     amigaos*)
        !          6963:       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
        !          6964:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          6965:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          6966:
        !          6967:       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
        !          6968:       # that the semantics of dynamic libraries on AmigaOS, at least up
        !          6969:       # to version 4, is to share data among multiple programs linked
        !          6970:       # with the same dynamic library.  Since this doesn't match the
        !          6971:       # behavior of shared libraries on other platforms, we can't use
        !          6972:       # them.
        !          6973:       _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          6974:       ;;
        !          6975:
        !          6976:     beos*)
        !          6977:       if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
        !          6978:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        !          6979:        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
        !          6980:        # support --undefined.  This deserves some investigation.  FIXME
        !          6981:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          6982:       else
        !          6983:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          6984:       fi
        !          6985:       ;;
        !          6986:
        !          6987:     cygwin* | mingw* | pw32*)
        !          6988:       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, as there is
        !          6989:       # no search path for DLLs.
        !          6990:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          6991:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        !          6992:       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          6993:
        !          6994:       extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
        !          6995:        sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
        !          6996:        test -f $output_objdir/impgen.exe || (cd $output_objdir && \
        !          6997:        if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
        !          6998:        else $CC -o impgen impgen.c ; fi)~
        !          6999:        $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
        !          7000:
        !          7001:       _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
        !          7002:
        !          7003:       # cygwin and mingw dlls have different entry points and sets of symbols
        !          7004:       # to exclude.
        !          7005:       # FIXME: what about values for MSVC?
        !          7006:       dll_entry=__cygwin_dll_entry@12
        !          7007:       dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
        !          7008:       case $host_os in
        !          7009:       mingw*)
        !          7010:        # mingw values
        !          7011:        dll_entry=_DllMainCRTStartup@12
        !          7012:        dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
        !          7013:        ;;
        !          7014:       esac
        !          7015:
        !          7016:       # mingw and cygwin differ, and it's simplest to just exclude the union
        !          7017:       # of the two symbol sets.
        !          7018:       dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
        !          7019:
        !          7020:       # recent cygwin and mingw systems supply a stub DllMain which the user
        !          7021:       # can override, but on older systems we have to supply one (in ltdll.c)
        !          7022:       if test "x$lt_cv_need_dllmain" = "xyes"; then
        !          7023:        ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
        !          7024:        ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
        !          7025:        test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
        !          7026:       else
        !          7027:        ltdll_obj=
        !          7028:        ltdll_cmds=
        !          7029:       fi
        !          7030:
        !          7031:       # Extract the symbol export list from an `--export-all' def file,
        !          7032:       # then regenerate the def file from the symbol export list, so that
        !          7033:       # the compiled dll only exports the symbol export list.
        !          7034:       # Be careful not to strip the DATA tag left by newer dlltools.
        !          7035:       _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"'
        !          7036:        $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
        !          7037:        sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
        !          7038:
        !          7039:       # If the export-symbols file already is a .def file (1st line
        !          7040:       # is EXPORTS), use it as is.
        !          7041:       # If DATA tags from a recent dlltool are present, honour them!
        !          7042:       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`head -1 $export_symbols`" = xEXPORTS; then
        !          7043:          cp $export_symbols $output_objdir/$soname-def;
        !          7044:        else
        !          7045:          echo EXPORTS > $output_objdir/$soname-def;
        !          7046:          _lt_hint=1;
        !          7047:          cat $export_symbols | while read symbol; do
        !          7048:           set dummy \$symbol;
        !          7049:           case \[$]# in
        !          7050:             2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
        !          7051:             *) echo "   \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
        !          7052:           esac;
        !          7053:           _lt_hint=`expr 1 + \$_lt_hint`;
        !          7054:          done;
        !          7055:        fi~
        !          7056:        '"$ltdll_cmds"'
        !          7057:        $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
        !          7058:        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
        !          7059:        $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
        !          7060:        $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
        !          7061:        $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
        !          7062:       ;;
        !          7063:
        !          7064:     netbsd*)
        !          7065:       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
        !          7066:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
        !          7067:        wlarc=
        !          7068:       else
        !          7069:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          7070:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
        !          7071:       fi
        !          7072:       ;;
        !          7073:
        !          7074:     solaris* | sysv5*)
        !          7075:       if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
        !          7076:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7077:        cat <<EOF 1>&2
        !          7078:
        !          7079: *** Warning: The releases 2.8.* of the GNU linker cannot reliably
        !          7080: *** create shared libraries on Solaris systems.  Therefore, libtool
        !          7081: *** is disabling shared libraries support.  We urge you to upgrade GNU
        !          7082: *** binutils to release 2.9.1 or newer.  Another option is to modify
        !          7083: *** your PATH or compiler configuration so that the native linker is
        !          7084: *** used, and then restart.
        !          7085:
        !          7086: EOF
        !          7087:       elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
        !          7088:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          7089:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
        !          7090:       else
        !          7091:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7092:       fi
        !          7093:       ;;
        !          7094:
        !          7095:     sunos4*)
        !          7096:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        !          7097:       wlarc=
        !          7098:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7099:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7100:       ;;
        !          7101:
        !          7102:     *)
        !          7103:       if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
        !          7104:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
        !          7105:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
        !          7106:       else
        !          7107:        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7108:       fi
        !          7109:       ;;
        !          7110:     esac
        !          7111:
        !          7112:     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
        !          7113:       runpath_var=LD_RUN_PATH
        !          7114:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
        !          7115:       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
        !          7116:       case $host_os in
        !          7117:       cygwin* | mingw* | pw32*)
        !          7118:        # dlltool doesn't understand --whole-archive et. al.
        !          7119:        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
        !          7120:        ;;
        !          7121:       *)
        !          7122:        # ancient GNU ld didn't support --whole-archive et. al.
        !          7123:        if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
        !          7124:        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
        !          7125:        else
        !          7126:        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
        !          7127:        fi
        !          7128:        ;;
        !          7129:       esac
        !          7130:     fi
        !          7131:   else
        !          7132:     # PORTME fill in a description of your system's linker (not GNU ld)
        !          7133:     case $host_os in
        !          7134:     aix3*)
        !          7135:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        !          7136:       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          7137:       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
        !          7138:       # Note: this linker hardcodes the directories in LIBPATH if there
        !          7139:       # are no directories specified by -L.
        !          7140:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7141:       if test "$GCC" = yes && test -z "$link_static_flag"; then
        !          7142:        # Neither direct hardcoding nor static linking is supported with a
        !          7143:        # broken collect2.
        !          7144:        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
        !          7145:       fi
        !          7146:       ;;
        !          7147:
        !          7148:     aix4* | aix5*)
        !          7149:       if test "$host_cpu" = ia64; then
        !          7150:        # On IA64, the linker does run time linking by default, so we don't
        !          7151:        # have to do anything special.
        !          7152:        aix_use_runtimelinking=no
        !          7153:        exp_sym_flag='-Bexport'
        !          7154:        no_entry_flag=""
        !          7155:       else
        !          7156:        # If we're using GNU nm, then we don't want the "-C" option.
        !          7157:        # -C means demangle to AIX nm, but means don't demangle with GNU nm
        !          7158:        if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
        !          7159:          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
        !          7160:        else
        !          7161:          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
        !          7162:        fi
        !          7163:        aix_use_runtimelinking=no
        !          7164:
        !          7165:        # Test if we are trying to use run time linking or normal
        !          7166:        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
        !          7167:        # need to do runtime linking.
        !          7168:        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
        !          7169:          for ld_flag in $LDFLAGS; do
        !          7170:          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
        !          7171:            aix_use_runtimelinking=yes
        !          7172:            break
        !          7173:          fi
        !          7174:          done
        !          7175:        esac
        !          7176:
        !          7177:        exp_sym_flag='-bexport'
        !          7178:        no_entry_flag='-bnoentry'
        !          7179:       fi
        !          7180:
        !          7181:       # When large executables or shared objects are built, AIX ld can
        !          7182:       # have problems creating the table of contents.  If linking a library
        !          7183:       # or program results in "error TOC overflow" add -mminimal-toc to
        !          7184:       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
        !          7185:       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
        !          7186:
        !          7187:       _LT_AC_TAGVAR(archive_cmds, $1)=''
        !          7188:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7189:       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
        !          7190:       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          7191:
        !          7192:       if test "$GCC" = yes; then
        !          7193:        case $host_os in aix4.[012]|aix4.[012].*)
        !          7194:        # We only want to do this on AIX 4.2 and lower, the check
        !          7195:        # below for broken collect2 doesn't work under 4.3+
        !          7196:          collect2name=`${CC} -print-prog-name=collect2`
        !          7197:          if test -f "$collect2name" && \
        !          7198:           strings "$collect2name" | grep resolve_lib_name >/dev/null
        !          7199:          then
        !          7200:          # We have reworked collect2
        !          7201:          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7202:          else
        !          7203:          # We have old collect2
        !          7204:          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
        !          7205:          # It fails to find uninstalled libraries when the uninstalled
        !          7206:          # path is not listed in the libpath.  Setting hardcode_minus_L
        !          7207:          # to unsupported forces relinking
        !          7208:          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7209:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7210:          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
        !          7211:          fi
        !          7212:        esac
        !          7213:        shared_flag='-shared'
        !          7214:       else
        !          7215:        # not using gcc
        !          7216:        if test "$host_cpu" = ia64; then
        !          7217:        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
        !          7218:        # chokes on -Wl,-G. The following line is correct:
        !          7219:          shared_flag='-G'
        !          7220:        else
        !          7221:        if test "$aix_use_runtimelinking" = yes; then
        !          7222:            shared_flag='${wl}-G'
        !          7223:          else
        !          7224:            shared_flag='${wl}-bM:SRE'
        !          7225:        fi
        !          7226:        fi
        !          7227:       fi
        !          7228:
        !          7229:       # It seems that -bexpall does not export symbols beginning with
        !          7230:       # underscore (_), so it is better to generate a list of symbols to export.
        !          7231:       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          7232:       if test "$aix_use_runtimelinking" = yes; then
        !          7233:        # Warning - without using the other runtime loading flags (-brtl),
        !          7234:        # -berok will link without error, but may produce a broken library.
        !          7235:        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
        !          7236:        # Determine the default libpath from the value encoded in an empty executable.
        !          7237:        _LT_AC_SYS_LIBPATH_AIX
        !          7238:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
        !          7239:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
        !          7240:        else
        !          7241:        if test "$host_cpu" = ia64; then
        !          7242:          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
        !          7243:          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
        !          7244:          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
        !          7245:        else
        !          7246:         # Determine the default libpath from the value encoded in an empty executable.
        !          7247:         _LT_AC_SYS_LIBPATH_AIX
        !          7248:         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
        !          7249:          # Warning - without using the other run time loading flags,
        !          7250:          # -berok will link without error, but may produce a broken library.
        !          7251:          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
        !          7252:          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
        !          7253:          # -bexpall does not export symbols beginning with underscore (_)
        !          7254:          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
        !          7255:          # Exported symbols can be pulled into shared objects from archives
        !          7256:          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
        !          7257:          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
        !          7258:          # This is similar to how AIX traditionally builds it's shared libraries.
        !          7259:          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
        !          7260:        fi
        !          7261:       fi
        !          7262:       ;;
        !          7263:
        !          7264:     amigaos*)
        !          7265:       _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
        !          7266:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7267:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7268:       # see comment about different semantics on the GNU ld section
        !          7269:       _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7270:       ;;
        !          7271:
        !          7272:     bsdi4*)
        !          7273:       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
        !          7274:       ;;
        !          7275:
        !          7276:     cygwin* | mingw* | pw32*)
        !          7277:       # When not using gcc, we currently assume that we are using
        !          7278:       # Microsoft Visual C++.
        !          7279:       # hardcode_libdir_flag_spec is actually meaningless, as there is
        !          7280:       # no search path for DLLs.
        !          7281:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
        !          7282:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        !          7283:       # Tell ltmain to make .lib files, not .a files.
        !          7284:       libext=lib
        !          7285:       # FIXME: Setting linknames here is a bad hack.
        !          7286:       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
        !          7287:       # The linker will automatically build a .lib file if we build a DLL.
        !          7288:       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
        !          7289:       # FIXME: Should let the user specify the lib program.
        !          7290:       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
        !          7291:       fix_srcfile_path='`cygpath -w "$srcfile"`'
        !          7292:       ;;
        !          7293:
        !          7294:     darwin* | rhapsody*)
        !          7295:       case "$host_os" in
        !          7296:       rhapsody* | darwin1.[[012]])
        !          7297:        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
        !          7298:        ;;
        !          7299:       *) # Darwin 1.3 on
        !          7300:        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
        !          7301:        ;;
        !          7302:       esac
        !          7303:
        !          7304:       # FIXME: Relying on posixy $() will cause problems for
        !          7305:       #        cross-compilation, but unfortunately the echo tests do not
        !          7306:       #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
        !          7307:       #               `"' quotes if we put them in here... so don't!
        !          7308:       _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
        !          7309:       # We need to add '_' to the symbols in $export_symbols first
        !          7310:       #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
        !          7311:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7312:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7313:       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
        !          7314:       ;;
        !          7315:
        !          7316:     dgux*)
        !          7317:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7318:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7319:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7320:       ;;
        !          7321:
        !          7322:     freebsd1*)
        !          7323:       _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7324:       ;;
        !          7325:
        !          7326:     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
        !          7327:     # support.  Future versions do this automatically, but an explicit c++rt0.o
        !          7328:     # does not break anything, and helps significantly (at the cost of a little
        !          7329:     # extra space).
        !          7330:     freebsd2.2*)
        !          7331:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
        !          7332:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          7333:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7334:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7335:       ;;
        !          7336:
        !          7337:     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
        !          7338:     freebsd2*)
        !          7339:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        !          7340:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7341:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7342:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7343:       ;;
        !          7344:
        !          7345:     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
        !          7346:     freebsd*)
        !          7347:       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
        !          7348:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          7349:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7350:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7351:       ;;
        !          7352:
        !          7353:     hpux9* | hpux10* | hpux11*)
        !          7354:       if test "$GCC" = yes; then
        !          7355:        case $host_os in
        !          7356:          hpux9*)
        !          7357:            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        !          7358:            ;;
        !          7359:          *)
        !          7360:            if test "$host_cpu" = ia64; then
        !          7361:              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        !          7362:            else
        !          7363:              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
        !          7364:            fi
        !          7365:            ;;
        !          7366:        esac
        !          7367:       else
        !          7368:        case $host_os in
        !          7369:          hpux9*)
        !          7370:            _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        !          7371:            ;;
        !          7372:          *)
        !          7373:            if test "$host_cpu" = ia64; then
        !          7374:              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7375:            else
        !          7376:              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        !          7377:            fi
        !          7378:            ;;
        !          7379:        esac
        !          7380:       fi
        !          7381:       if test "$host_cpu" = ia64; then
        !          7382:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7383:        _LT_AC_TAGVAR(hardcode_direct, $1)=no
        !          7384:        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7385:       else
        !          7386:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
        !          7387:        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          7388:        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7389:       fi
        !          7390:       # hardcode_minus_L: Not really in the search PATH,
        !          7391:       # but as the default location of the library.
        !          7392:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7393:       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        !          7394:       ;;
        !          7395:
        !          7396:     irix5* | irix6*)
        !          7397:       if test "$GCC" = yes; then
        !          7398:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        !          7399:       else
        !          7400:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
        !          7401:       fi
        !          7402:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          7403:       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          7404:       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          7405:       ;;
        !          7406:
        !          7407:     netbsd*)
        !          7408:       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
        !          7409:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
        !          7410:       else
        !          7411:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
        !          7412:       fi
        !          7413:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          7414:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7415:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7416:       ;;
        !          7417:
        !          7418:     newsos6)
        !          7419:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7420:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7421:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          7422:       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          7423:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7424:       ;;
        !          7425:
        !          7426:     openbsd*)
        !          7427:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7428:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7429:
        !          7430:       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
        !          7431:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
        !          7432:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        !          7433:        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
        !          7434:       else
        !          7435:        case $host_os in
        !          7436:         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
        !          7437:           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
        !          7438:           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          7439:           ;;
        !          7440:         *)
        !          7441:           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
        !          7442:           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
        !          7443:           ;;
        !          7444:        esac
        !          7445:       fi
        !          7446:       ;;
        !          7447:
        !          7448:     os2*)
        !          7449:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7450:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7451:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
        !          7452:       _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
        !          7453:       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
        !          7454:       ;;
        !          7455:
        !          7456:     osf3*)
        !          7457:       if test "$GCC" = yes; then
        !          7458:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
        !          7459:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        !          7460:       else
        !          7461:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
        !          7462:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
        !          7463:       fi
        !          7464:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          7465:       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          7466:       ;;
        !          7467:
        !          7468:     osf4* | osf5*)     # as osf3* with the addition of -msym flag
        !          7469:       if test "$GCC" = yes; then
        !          7470:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
        !          7471:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
        !          7472:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
        !          7473:       else
        !          7474:        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
        !          7475:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
        !          7476:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
        !          7477:        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
        !          7478:
        !          7479:        # Both c and cxx compiler support -rpath directly
        !          7480:        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
        !          7481:       fi
        !          7482:       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
        !          7483:       ;;
        !          7484:
        !          7485:     sco3.2v5*)
        !          7486:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7487:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7488:       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
        !          7489:       runpath_var=LD_RUN_PATH
        !          7490:       hardcode_runpath_var=yes
        !          7491:       ;;
        !          7492:
        !          7493:     solaris*)
        !          7494:       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
        !          7495:       if test "$GCC" = yes; then
        !          7496:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        !          7497:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          7498:          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
        !          7499:       else
        !          7500:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7501:        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          7502:        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
        !          7503:       fi
        !          7504:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
        !          7505:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7506:       case $host_os in
        !          7507:       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
        !          7508:       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
        !          7509:        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
        !          7510:       esac
        !          7511:       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
        !          7512:       ;;
        !          7513:
        !          7514:     sunos4*)
        !          7515:       if test "x$host_vendor" = xsequent; then
        !          7516:        # Use $CC to link under sequent, because it throws in some extra .o
        !          7517:        # files that make .init and .fini sections work.
        !          7518:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
        !          7519:       else
        !          7520:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
        !          7521:       fi
        !          7522:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7523:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7524:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
        !          7525:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7526:       ;;
        !          7527:
        !          7528:     sysv4)
        !          7529:       if test "x$host_vendor" = xsni; then
        !          7530:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7531:        _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
        !          7532:       else
        !          7533:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7534:        _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
        !          7535:       fi
        !          7536:       runpath_var='LD_RUN_PATH'
        !          7537:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7538:       ;;
        !          7539:
        !          7540:     sysv4.3*)
        !          7541:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7542:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7543:       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
        !          7544:       ;;
        !          7545:
        !          7546:     sysv4*MP*)
        !          7547:       if test -d /usr/nec; then
        !          7548:        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7549:        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7550:        runpath_var=LD_RUN_PATH
        !          7551:        hardcode_runpath_var=yes
        !          7552:        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
        !          7553:       fi
        !          7554:       ;;
        !          7555:
        !          7556:     sysv4.2uw2*)
        !          7557:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
        !          7558:       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
        !          7559:       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
        !          7560:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7561:       hardcode_runpath_var=yes
        !          7562:       runpath_var=LD_RUN_PATH
        !          7563:       ;;
        !          7564:
        !          7565:    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
        !          7566:       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
        !          7567:       if test "$GCC" = yes; then
        !          7568:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        !          7569:       else
        !          7570:        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
        !          7571:       fi
        !          7572:       runpath_var='LD_RUN_PATH'
        !          7573:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7574:       ;;
        !          7575:
        !          7576:     sysv5*)
        !          7577:       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
        !          7578:       # $CC -shared without GNU ld will not create a library from C++
        !          7579:       # object files and a static libstdc++, better avoid it by now
        !          7580:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7581:       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
        !          7582:                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
        !          7583:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
        !          7584:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7585:       runpath_var='LD_RUN_PATH'
        !          7586:       ;;
        !          7587:
        !          7588:     uts4*)
        !          7589:       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
        !          7590:       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
        !          7591:       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
        !          7592:       ;;
        !          7593:
        !          7594:     *)
        !          7595:       _LT_AC_TAGVAR(ld_shlibs, $1)=no
        !          7596:       ;;
        !          7597:     esac
        !          7598:   fi
        !          7599: ])
        !          7600: AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
        !          7601: test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
        !          7602:
        !          7603: variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
        !          7604: if test "$GCC" = yes; then
        !          7605:   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
        !          7606: fi
        !          7607:
        !          7608: #
        !          7609: # Do we need to explicitly link libc?
        !          7610: #
        !          7611: _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
        !          7612: if test "$enable_shared" = yes && test "$GCC" = yes; then
        !          7613:   case $_LT_AC_TAGVAR(archive_cmds, $1) in
        !          7614:   *'~'*)
        !          7615:     # FIXME: we may have to deal with multi-command sequences.
        !          7616:     ;;
        !          7617:   '$CC '*)
        !          7618:     # Test whether the compiler implicitly links with -lc since on some
        !          7619:     # systems, -lgcc has to come before -lc. If gcc already passes -lc
        !          7620:     # to ld, don't add -lc before -lgcc.
        !          7621:     AC_MSG_CHECKING([whether -lc should be explicitly linked in])
        !          7622:     $rm conftest*
        !          7623:     echo 'static int dummy;' > conftest.$ac_ext
        !          7624:
        !          7625:     if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
        !          7626:       soname=conftest
        !          7627:       lib=conftest
        !          7628:       libobjs=conftest.$ac_objext
        !          7629:       deplibs=
        !          7630:       wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
        !          7631:       compiler_flags=-v
        !          7632:       linker_flags=-v
        !          7633:       verstring=
        !          7634:       output_objdir=.
        !          7635:       libname=conftest
        !          7636:       lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
        !          7637:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=
        !          7638:       if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
        !          7639:       then
        !          7640:        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
        !          7641:       else
        !          7642:        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
        !          7643:       fi
        !          7644:       _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
        !          7645:     else
        !          7646:       cat conftest.err 1>&5
        !          7647:     fi
        !          7648:     $rm conftest*
        !          7649:     AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
        !          7650:     ;;
        !          7651:   esac
        !          7652: fi
        !          7653: ])# AC_LIBTOOL_PROG_LD_SHLIBS
        !          7654:
        !          7655:
        !          7656: # _LT_AC_FILE_LTDLL_C
        !          7657: # -------------------
        !          7658: # Be careful that the start marker always follows a newline.
        !          7659: AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
        !          7660: # /* ltdll.c starts here */
        !          7661: # #define WIN32_LEAN_AND_MEAN
        !          7662: # #include <windows.h>
        !          7663: # #undef WIN32_LEAN_AND_MEAN
        !          7664: # #include <stdio.h>
        !          7665: #
        !          7666: # #ifndef __CYGWIN__
        !          7667: # #  ifdef __CYGWIN32__
        !          7668: # #    define __CYGWIN__ __CYGWIN32__
        !          7669: # #  endif
        !          7670: # #endif
        !          7671: #
        !          7672: # #ifdef __cplusplus
        !          7673: # extern "C" {
        !          7674: # #endif
        !          7675: # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
        !          7676: # #ifdef __cplusplus
        !          7677: # }
        !          7678: # #endif
        !          7679: #
        !          7680: # #ifdef __CYGWIN__
        !          7681: # #include <cygwin/cygwin_dll.h>
        !          7682: # DECLARE_CYGWIN_DLL( DllMain );
        !          7683: # #endif
        !          7684: # HINSTANCE __hDllInstance_base;
        !          7685: #
        !          7686: # BOOL APIENTRY
        !          7687: # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
        !          7688: # {
        !          7689: #   __hDllInstance_base = hInst;
        !          7690: #   return TRUE;
        !          7691: # }
        !          7692: # /* ltdll.c ends here */
        !          7693: ])# _LT_AC_FILE_LTDLL_C
        !          7694:
        !          7695:
        !          7696: # _LT_AC_FILE_IMPGEN_C
        !          7697: # --------------------
        !          7698: # Be careful that the start marker always follows a newline.
        !          7699: AC_DEFUN([_LT_AC_FILE_IMPGEN_C], [
        !          7700: # /* impgen.c starts here */
        !          7701: # /*   Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
        !          7702: #
        !          7703: #  This file is part of GNU libtool.
        !          7704: #
        !          7705: #  This program is free software; you can redistribute it and/or modify
        !          7706: #  it under the terms of the GNU General Public License as published by
        !          7707: #  the Free Software Foundation; either version 2 of the License, or
        !          7708: #  (at your option) any later version.
        !          7709: #
        !          7710: #  This program is distributed in the hope that it will be useful,
        !          7711: #  but WITHOUT ANY WARRANTY; without even the implied warranty of
        !          7712: #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !          7713: #  GNU General Public License for more details.
        !          7714: #
        !          7715: #  You should have received a copy of the GNU General Public License
        !          7716: #  along with this program; if not, write to the Free Software
        !          7717: #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
        !          7718: #  */
        !          7719: #
        !          7720: # #include <stdio.h>           /* for printf() */
        !          7721: # #include <unistd.h>          /* for open(), lseek(), read() */
        !          7722: # #include <fcntl.h>           /* for O_RDONLY, O_BINARY */
        !          7723: # #include <string.h>          /* for strdup() */
        !          7724: #
        !          7725: # /* O_BINARY isn't required (or even defined sometimes) under Unix */
        !          7726: # #ifndef O_BINARY
        !          7727: # #define O_BINARY 0
        !          7728: # #endif
        !          7729: #
        !          7730: # static unsigned int
        !          7731: # pe_get16 (fd, offset)
        !          7732: #      int fd;
        !          7733: #      int offset;
        !          7734: # {
        !          7735: #   unsigned char b[2];
        !          7736: #   lseek (fd, offset, SEEK_SET);
        !          7737: #   read (fd, b, 2);
        !          7738: #   return b[0] + (b[1]<<8);
        !          7739: # }
        !          7740: #
        !          7741: # static unsigned int
        !          7742: # pe_get32 (fd, offset)
        !          7743: #     int fd;
        !          7744: #     int offset;
        !          7745: # {
        !          7746: #   unsigned char b[4];
        !          7747: #   lseek (fd, offset, SEEK_SET);
        !          7748: #   read (fd, b, 4);
        !          7749: #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
        !          7750: # }
        !          7751: #
        !          7752: # static unsigned int
        !          7753: # pe_as32 (ptr)
        !          7754: #      void *ptr;
        !          7755: # {
        !          7756: #   unsigned char *b = ptr;
        !          7757: #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
        !          7758: # }
        !          7759: #
        !          7760: # int
        !          7761: # main (argc, argv)
        !          7762: #     int argc;
        !          7763: #     char *argv[];
        !          7764: # {
        !          7765: #     int dll;
        !          7766: #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
        !          7767: #     unsigned long export_rva, export_size, nsections, secptr, expptr;
        !          7768: #     unsigned long name_rvas, nexp;
        !          7769: #     unsigned char *expdata, *erva;
        !          7770: #     char *filename, *dll_name;
        !          7771: #
        !          7772: #     filename = argv[1];
        !          7773: #
        !          7774: #     dll = open(filename, O_RDONLY|O_BINARY);
        !          7775: #     if (dll < 1)
        !          7776: #      return 1;
        !          7777: #
        !          7778: #     dll_name = filename;
        !          7779: #
        !          7780: #     for (i=0; filename[i]; i++)
        !          7781: #      if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
        !          7782: #          dll_name = filename + i +1;
        !          7783: #
        !          7784: #     pe_header_offset = pe_get32 (dll, 0x3c);
        !          7785: #     opthdr_ofs = pe_header_offset + 4 + 20;
        !          7786: #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
        !          7787: #
        !          7788: #     if (num_entries < 1) /* no exports */
        !          7789: #      return 1;
        !          7790: #
        !          7791: #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
        !          7792: #     export_size = pe_get32 (dll, opthdr_ofs + 100);
        !          7793: #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
        !          7794: #     secptr = (pe_header_offset + 4 + 20 +
        !          7795: #            pe_get16 (dll, pe_header_offset + 4 + 16));
        !          7796: #
        !          7797: #     expptr = 0;
        !          7798: #     for (i = 0; i < nsections; i++)
        !          7799: #     {
        !          7800: #      char sname[8];
        !          7801: #      unsigned long secptr1 = secptr + 40 * i;
        !          7802: #      unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
        !          7803: #      unsigned long vsize = pe_get32 (dll, secptr1 + 16);
        !          7804: #      unsigned long fptr = pe_get32 (dll, secptr1 + 20);
        !          7805: #      lseek(dll, secptr1, SEEK_SET);
        !          7806: #      read(dll, sname, 8);
        !          7807: #      if (vaddr <= export_rva && vaddr+vsize > export_rva)
        !          7808: #      {
        !          7809: #          expptr = fptr + (export_rva - vaddr);
        !          7810: #          if (export_rva + export_size > vaddr + vsize)
        !          7811: #              export_size = vsize - (export_rva - vaddr);
        !          7812: #          break;
        !          7813: #      }
        !          7814: #     }
        !          7815: #
        !          7816: #     expdata = (unsigned char*)malloc(export_size);
        !          7817: #     lseek (dll, expptr, SEEK_SET);
        !          7818: #     read (dll, expdata, export_size);
        !          7819: #     erva = expdata - export_rva;
        !          7820: #
        !          7821: #     nexp = pe_as32 (expdata+24);
        !          7822: #     name_rvas = pe_as32 (expdata+32);
        !          7823: #
        !          7824: #     printf ("EXPORTS\n");
        !          7825: #     for (i = 0; i<nexp; i++)
        !          7826: #     {
        !          7827: #      unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
        !          7828: #      printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
        !          7829: #     }
        !          7830: #
        !          7831: #     return 0;
        !          7832: # }
        !          7833: # /* impgen.c ends here */
        !          7834: ])# _LT_AC_FILE_IMPGEN_C
        !          7835:
        !          7836: # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
        !          7837: # ---------------------------------
        !          7838: AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
        !          7839:
        !          7840:
        !          7841: # old names
        !          7842: AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
        !          7843: AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
        !          7844: AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
        !          7845: AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
        !          7846: AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
        !          7847: AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
        !          7848: AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
        !          7849:
        !          7850: # This is just to silence aclocal about the macro not being used
        !          7851: ifelse([AC_DISABLE_FAST_INSTALL])
        !          7852:
        !          7853: AC_DEFUN([LT_AC_PROG_GCJ],
        !          7854: [AC_CHECK_TOOL(GCJ, gcj, no)
        !          7855:   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
        !          7856:   AC_SUBST(GCJFLAGS)
        !          7857: ])
        !          7858:
        !          7859: AC_DEFUN([LT_AC_PROG_RC],
        !          7860: [AC_CHECK_TOOL(RC, windres, no)
        !          7861: ])
        !          7862:
        !          7863:
        !          7864: AC_DEFUN(AC_MY_LIBS,
        !          7865: [
        !          7866: if ` test "$1" `
        !          7867: then
        !          7868:   AC_MSG_CHECKING(gmp library)
        !          7869:        if  test -r "$1/lib$2.a"
        !          7870:        then
        !          7871:          LDADD="$LDADD $1/lib$2.a"
        !          7872:        else
        !          7873:           AC_MSG_ERROR($2 not found)
        !          7874:        fi
        !          7875:   AC_MSG_RESULT(yes)
        !          7876: else
        !          7877:   AC_CHECK_LIB($2, main, , AC_MSG_ERROR($2 not found))
        !          7878: fi
        !          7879: ]
        !          7880: )
        !          7881:
        !          7882: AC_DEFUN(AC_MY_HEADERS,
        !          7883: [
        !          7884: if  test "$1"
        !          7885: then
        !          7886:   AC_CHECK_HEADER($1/$2, INCLUDES="$INCLUDES -I$1",AC_MSG_ERROR(echo $2 not found in $1))
        !          7887: else
        !          7888:   AC_CHECK_HEADER($2,,           AC_MSG_ERROR($2 not found))
        !          7889: fi
        !          7890: ])
        !          7891:
        !          7892: AC_DEFUN(AC_CHECK_OS,
        !          7893: [
        !          7894: AC_CACHE_CHECK([OS type], mpfr_cv_os_type, [
        !          7895:   mpfr_cv_os_type=`uname -s`
        !          7896: ])
        !          7897: OS_TYPE=$mpfr_cv_os_type
        !          7898: ])
        !          7899:
        !          7900: AC_DEFUN(AC_CHECK_MACHTYPE,
        !          7901: [
        !          7902: AC_CACHE_CHECK([Mach type], mpfr_cv_mach_type, [
        !          7903:   mpfr_cv_mach_type=`uname -m`
        !          7904: ])
        !          7905: MACHTYPE=$mpfr_cv_mach_type
        !          7906: ])
        !          7907:
        !          7908: dnl ------------------------------------------------------------
        !          7909:
        !          7910: AC_DEFUN(MPFR_CONFIGS,
        !          7911: [
        !          7912: case $host in
        !          7913:        *-*-solaris*)
        !          7914:                LM9X="-lm9x"
        !          7915:                ;;
        !          7916: esac
        !          7917:
        !          7918: AC_REPLACE_FUNCS(strcasecmp)
        !          7919:
        !          7920: dnl Check for IEEE-754 switches on Alpha
        !          7921: case $host in
        !          7922: alpha*-*-*)
        !          7923:   saved_CFLAGS="$CFLAGS"
        !          7924:   AC_CACHE_CHECK([for IEEE-754 switches], mpfr_cv_ieee_switches, [
        !          7925:   if test -n "$GCC"; then
        !          7926:     mpfr_cv_ieee_switches="-mfp-rounding-mode=d -mieee-with-inexact"
        !          7927:   else
        !          7928:     mpfr_cv_ieee_switches="-fprm d -ieee_with_inexact"
        !          7929:   fi
        !          7930:   CFLAGS="$CFLAGS $mpfr_cv_ieee_switches"
        !          7931:   AC_TRY_COMPILE(,,, mpfr_cv_ieee_switches="none")
        !          7932:   ])
        !          7933:   if test "$mpfr_cv_ieee_switches" = "none"; then
        !          7934:     CFLAGS="$saved_CFLAGS"
        !          7935:   else
        !          7936:     CFLAGS="$saved_CFLAGS $mpfr_cv_ieee_switches"
        !          7937:   fi
        !          7938: esac
        !          7939:
        !          7940: AC_CHECK_HEADERS(fpu_control.h)
        !          7941:
        !          7942: dnl Check for fesetround
        !          7943: AC_CACHE_CHECK([for fesetround], mpfr_cv_have_fesetround, [
        !          7944: saved_LIBS="$LIBS"
        !          7945: LIBS="$LIBS $LM9X"
        !          7946: AC_TRY_LINK([#include <fenv.h>], [fesetround(FE_TONEAREST);],
        !          7947:   mpfr_cv_have_fesetround=yes, mpfr_cv_have_fesetround=no)
        !          7948: LIBS="$saved_LIBS"
        !          7949: ])
        !          7950: if test "$mpfr_cv_have_fesetround" = "yes"; then
        !          7951:   LIBS="$LIBS $LM9X"
        !          7952:   AC_DEFINE(MPFR_HAVE_FESETROUND,1,[Define if you have the `fesetround' function via the <fenv.h> header file.])
        !          7953: fi
        !          7954:
        !          7955: dnl Check random functions
        !          7956: AC_CHECK_FUNCS(lrand48)
        !          7957:
        !          7958: dnl Check whether 0/0, 1/0, -1/0, sqrt(-1) are valid expressions
        !          7959: AC_CACHE_CHECK([for valid NaN], mpfr_cv_valid_nan, [
        !          7960: AC_TRY_RUN([
        !          7961: #include <math.h>
        !          7962: int main()
        !          7963: {
        !          7964:   double x = (0.0/0.0) + sqrt(-1.0);
        !          7965:   return x == 1.0/0.0;
        !          7966: }
        !          7967: ], mpfr_cv_valid_nan=yes, mpfr_cv_valid_nan=no, mpfr_cv_valid_nan=no)
        !          7968: ])
        !          7969: if test "$mpfr_cv_valid_nan" = "yes"; then
        !          7970:    AC_DEFINE(HAVE_INFS,1,[Define if 0/0, 1/0, -1/0 and sqrt(-1) work to generate NaN/infinities.])
        !          7971: fi
        !          7972:
        !          7973: dnl Check for gcc float-conversion bug; if need be, -ffloat-store is used to
        !          7974: dnl force the conversion to the destination type when a value is stored to
        !          7975: dnl a variable (see ISO C99 standard 5.1.2.3#13, 6.3.1.5#2, 6.3.1.8#2). This
        !          7976: dnl is important concerning the exponent range. Note that this doesn't solve
        !          7977: dnl the double-rounding problem (x86 processors still have to be set to the
        !          7978: dnl IEEE-754 compatible rounding mode).
        !          7979: if test -n "$GCC"; then
        !          7980:   AC_CACHE_CHECK([for gcc float-conversion bug], mpfr_cv_gcc_floatconv_bug, [
        !          7981:   AC_TRY_RUN([
        !          7982: #include <float.h>
        !          7983: #ifdef MPFR_HAVE_FESETROUND
        !          7984: #include <fenv.h>
        !          7985: #endif
        !          7986: int main()
        !          7987: {
        !          7988:   double x = 0.5;
        !          7989:   int i;
        !          7990:   for (i = 1; i <= 11; i++)
        !          7991:     x *= x;
        !          7992:   if (x != 0)
        !          7993:     return 1;
        !          7994: #ifdef MPFR_HAVE_FESETROUND
        !          7995:   /* Useful test for the G4 PowerPC */
        !          7996:   fesetround(FE_TOWARDZERO);
        !          7997:   x = DBL_MAX;
        !          7998:   x *= 2.0;
        !          7999:   if (x != DBL_MAX)
        !          8000:     return 1;
        !          8001: #endif
        !          8002:   return 0;
        !          8003: }
        !          8004:   ], [mpfr_cv_gcc_floatconv_bug="no"],
        !          8005:      [mpfr_cv_gcc_floatconv_bug="yes, use -ffloat-store"],
        !          8006:      [mpfr_cv_gcc_floatconv_bug="cannot test, use -ffloat-store"])
        !          8007:   ])
        !          8008:   if test "$mpfr_cv_gcc_floatconv_bug" != "no"; then
        !          8009:     CFLAGS="$CFLAGS -ffloat-store"
        !          8010:   fi
        !          8011: fi
        !          8012:
        !          8013: dnl Check if denormalized numbers are supported
        !          8014: AC_CACHE_CHECK([for denormalized numbers], mpfr_cv_have_denorms, [
        !          8015: AC_TRY_RUN([
        !          8016: #include <math.h>
        !          8017: #include <stdio.h>
        !          8018: int main()
        !          8019: {
        !          8020:   double x = 2.22507385850720138309e-308;
        !          8021:   fprintf (stderr, "%e\n", x / 2.0);
        !          8022:   return 2.0 * (x / 2.0) != x;
        !          8023: }
        !          8024: ], mpfr_cv_have_denorms=yes, mpfr_cv_have_denorms=no, mpfr_cv_have_denorms=no)
        !          8025: ])
        !          8026: if test "$mpfr_cv_have_denorms" = "yes"; then
        !          8027:   AC_DEFINE(HAVE_DENORMS,1,[Define if denormalized floats work.])
        !          8028: fi
        !          8029:
        !          8030: ])
        !          8031:
        !          8032: # Do all the work for Automake.  This macro actually does too much --
        !          8033: # some checks are only needed if your package does certain things.
        !          8034: # But this isn't really a big deal.
        !          8035:
        !          8036: # serial 5
        !          8037:
        !          8038: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
        !          8039: # written in clear, in which case automake, when reading aclocal.m4,
        !          8040: # will think it sees a *use*, and therefore will trigger all it's
        !          8041: # C support machinery.  Also note that it means that autoscan, seeing
        !          8042: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
        !          8043:
        !          8044:
        !          8045: # We require 2.13 because we rely on SHELL being computed by configure.
        !          8046: AC_PREREQ([2.13])
        !          8047:
        !          8048: # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
        !          8049: # -----------------------------------------------------------
        !          8050: # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
        !          8051: # The purpose of this macro is to provide the user with a means to
        !          8052: # check macros which are provided without letting her know how the
        !          8053: # information is coded.
        !          8054: # If this macro is not defined by Autoconf, define it here.
        !          8055: ifdef([AC_PROVIDE_IFELSE],
        !          8056:       [],
        !          8057:       [define([AC_PROVIDE_IFELSE],
        !          8058:               [ifdef([AC_PROVIDE_$1],
        !          8059:                      [$2], [$3])])])
        !          8060:
        !          8061:
        !          8062: # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
        !          8063: # ----------------------------------------------
        !          8064: AC_DEFUN([AM_INIT_AUTOMAKE],
        !          8065: [AC_REQUIRE([AC_PROG_INSTALL])dnl
        !          8066: # test to see if srcdir already configured
        !          8067: if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
        !          8068:    test -f $srcdir/config.status; then
        !          8069:   AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
        !          8070: fi
        !          8071:
        !          8072: # Define the identity of the package.
        !          8073: PACKAGE=$1
        !          8074: AC_SUBST(PACKAGE)dnl
        !          8075: VERSION=$2
        !          8076: AC_SUBST(VERSION)dnl
        !          8077: ifelse([$3],,
        !          8078: [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
        !          8079: AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
        !          8080:
        !          8081: # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
        !          8082: # the ones we care about.
        !          8083: ifdef([m4_pattern_allow],
        !          8084:       [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
        !          8085:
        !          8086: # Autoconf 2.50 always computes EXEEXT.  However we need to be
        !          8087: # compatible with 2.13, for now.  So we always define EXEEXT, but we
        !          8088: # don't compute it.
        !          8089: AC_SUBST(EXEEXT)
        !          8090: # Similar for OBJEXT -- only we only use OBJEXT if the user actually
        !          8091: # requests that it be used.  This is a bit dumb.
        !          8092: : ${OBJEXT=o}
        !          8093: AC_SUBST(OBJEXT)
        !          8094:
        !          8095: # Some tools Automake needs.
        !          8096: AC_REQUIRE([AM_SANITY_CHECK])dnl
        !          8097: AC_REQUIRE([AC_ARG_PROGRAM])dnl
        !          8098: AM_MISSING_PROG(ACLOCAL, aclocal)
        !          8099: AM_MISSING_PROG(AUTOCONF, autoconf)
        !          8100: AM_MISSING_PROG(AUTOMAKE, automake)
        !          8101: AM_MISSING_PROG(AUTOHEADER, autoheader)
        !          8102: AM_MISSING_PROG(MAKEINFO, makeinfo)
        !          8103: AM_MISSING_PROG(AMTAR, tar)
        !          8104: AM_PROG_INSTALL_SH
        !          8105: AM_PROG_INSTALL_STRIP
        !          8106: # We need awk for the "check" target.  The system "awk" is bad on
        !          8107: # some platforms.
        !          8108: AC_REQUIRE([AC_PROG_AWK])dnl
        !          8109: AC_REQUIRE([AC_PROG_MAKE_SET])dnl
        !          8110: AC_REQUIRE([AM_DEP_TRACK])dnl
        !          8111: AC_REQUIRE([AM_SET_DEPDIR])dnl
        !          8112: AC_PROVIDE_IFELSE([AC_PROG_][CC],
        !          8113:                   [_AM_DEPENDENCIES(CC)],
        !          8114:                   [define([AC_PROG_][CC],
        !          8115:                           defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
        !          8116: AC_PROVIDE_IFELSE([AC_PROG_][CXX],
        !          8117:                   [_AM_DEPENDENCIES(CXX)],
        !          8118:                   [define([AC_PROG_][CXX],
        !          8119:                           defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
        !          8120: ])
        !          8121:
        !          8122: #
        !          8123: # Check to make sure that the build environment is sane.
        !          8124: #
        !          8125:
        !          8126: # serial 3
        !          8127:
        !          8128: # AM_SANITY_CHECK
        !          8129: # ---------------
        !          8130: AC_DEFUN([AM_SANITY_CHECK],
        !          8131: [AC_MSG_CHECKING([whether build environment is sane])
        !          8132: # Just in case
        !          8133: sleep 1
        !          8134: echo timestamp > conftest.file
        !          8135: # Do `set' in a subshell so we don't clobber the current shell's
        !          8136: # arguments.  Must try -L first in case configure is actually a
        !          8137: # symlink; some systems play weird games with the mod time of symlinks
        !          8138: # (eg FreeBSD returns the mod time of the symlink's containing
        !          8139: # directory).
        !          8140: if (
        !          8141:    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
        !          8142:    if test "$[*]" = "X"; then
        !          8143:       # -L didn't work.
        !          8144:       set X `ls -t $srcdir/configure conftest.file`
        !          8145:    fi
        !          8146:    rm -f conftest.file
        !          8147:    if test "$[*]" != "X $srcdir/configure conftest.file" \
        !          8148:       && test "$[*]" != "X conftest.file $srcdir/configure"; then
        !          8149:
        !          8150:       # If neither matched, then we have a broken ls.  This can happen
        !          8151:       # if, for instance, CONFIG_SHELL is bash and it inherits a
        !          8152:       # broken ls alias from the environment.  This has actually
        !          8153:       # happened.  Such a system could not be considered "sane".
        !          8154:       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
        !          8155: alias in your environment])
        !          8156:    fi
        !          8157:
        !          8158:    test "$[2]" = conftest.file
        !          8159:    )
        !          8160: then
        !          8161:    # Ok.
        !          8162:    :
        !          8163: else
        !          8164:    AC_MSG_ERROR([newly created file is older than distributed files!
        !          8165: Check your system clock])
        !          8166: fi
        !          8167: AC_MSG_RESULT(yes)])
        !          8168:
        !          8169:
        !          8170: # serial 2
        !          8171:
        !          8172: # AM_MISSING_PROG(NAME, PROGRAM)
        !          8173: # ------------------------------
        !          8174: AC_DEFUN([AM_MISSING_PROG],
        !          8175: [AC_REQUIRE([AM_MISSING_HAS_RUN])
        !          8176: $1=${$1-"${am_missing_run}$2"}
        !          8177: AC_SUBST($1)])
        !          8178:
        !          8179:
        !          8180: # AM_MISSING_HAS_RUN
        !          8181: # ------------------
        !          8182: # Define MISSING if not defined so far and test if it supports --run.
        !          8183: # If it does, set am_missing_run to use it, otherwise, to nothing.
        !          8184: AC_DEFUN([AM_MISSING_HAS_RUN],
        !          8185: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
        !          8186: test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
        !          8187: # Use eval to expand $SHELL
        !          8188: if eval "$MISSING --run true"; then
        !          8189:   am_missing_run="$MISSING --run "
        !          8190: else
        !          8191:   am_missing_run=
        !          8192:   am_backtick='`'
        !          8193:   AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
        !          8194: fi
        !          8195: ])
        !          8196:
        !          8197: # AM_AUX_DIR_EXPAND
        !          8198:
        !          8199: # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
        !          8200: # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
        !          8201: # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
        !          8202: #
        !          8203: # Of course, Automake must honor this variable whenever it calls a
        !          8204: # tool from the auxiliary directory.  The problem is that $srcdir (and
        !          8205: # therefore $ac_aux_dir as well) can be either absolute or relative,
        !          8206: # depending on how configure is run.  This is pretty annoying, since
        !          8207: # it makes $ac_aux_dir quite unusable in subdirectories: in the top
        !          8208: # source directory, any form will work fine, but in subdirectories a
        !          8209: # relative path needs to be adjusted first.
        !          8210: #
        !          8211: # $ac_aux_dir/missing
        !          8212: #    fails when called from a subdirectory if $ac_aux_dir is relative
        !          8213: # $top_srcdir/$ac_aux_dir/missing
        !          8214: #    fails if $ac_aux_dir is absolute,
        !          8215: #    fails when called from a subdirectory in a VPATH build with
        !          8216: #          a relative $ac_aux_dir
        !          8217: #
        !          8218: # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
        !          8219: # are both prefixed by $srcdir.  In an in-source build this is usually
        !          8220: # harmless because $srcdir is `.', but things will broke when you
        !          8221: # start a VPATH build or use an absolute $srcdir.
        !          8222: #
        !          8223: # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
        !          8224: # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
        !          8225: #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
        !          8226: # and then we would define $MISSING as
        !          8227: #   MISSING="\${SHELL} $am_aux_dir/missing"
        !          8228: # This will work as long as MISSING is not called from configure, because
        !          8229: # unfortunately $(top_srcdir) has no meaning in configure.
        !          8230: # However there are other variables, like CC, which are often used in
        !          8231: # configure, and could therefore not use this "fixed" $ac_aux_dir.
        !          8232: #
        !          8233: # Another solution, used here, is to always expand $ac_aux_dir to an
        !          8234: # absolute PATH.  The drawback is that using absolute paths prevent a
        !          8235: # configured tree to be moved without reconfiguration.
        !          8236:
        !          8237: AC_DEFUN([AM_AUX_DIR_EXPAND], [
        !          8238: # expand $ac_aux_dir to an absolute path
        !          8239: am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
        !          8240: ])
        !          8241:
        !          8242: # AM_PROG_INSTALL_SH
        !          8243: # ------------------
        !          8244: # Define $install_sh.
        !          8245: AC_DEFUN([AM_PROG_INSTALL_SH],
        !          8246: [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
        !          8247: install_sh=${install_sh-"$am_aux_dir/install-sh"}
        !          8248: AC_SUBST(install_sh)])
        !          8249:
        !          8250: # One issue with vendor `install' (even GNU) is that you can't
        !          8251: # specify the program used to strip binaries.  This is especially
        !          8252: # annoying in cross-compiling environments, where the build's strip
        !          8253: # is unlikely to handle the host's binaries.
        !          8254: # Fortunately install-sh will honor a STRIPPROG variable, so we
        !          8255: # always use install-sh in `make install-strip', and initialize
        !          8256: # STRIPPROG with the value of the STRIP variable (set by the user).
        !          8257: AC_DEFUN([AM_PROG_INSTALL_STRIP],
        !          8258: [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
        !          8259: INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
        !          8260: AC_SUBST([INSTALL_STRIP_PROGRAM])])
        !          8261:
        !          8262: # serial 4                                             -*- Autoconf -*-
        !          8263:
        !          8264:
        !          8265:
        !          8266: # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
        !          8267: # written in clear, in which case automake, when reading aclocal.m4,
        !          8268: # will think it sees a *use*, and therefore will trigger all it's
        !          8269: # C support machinery.  Also note that it means that autoscan, seeing
        !          8270: # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
        !          8271:
        !          8272:
        !          8273:
        !          8274: # _AM_DEPENDENCIES(NAME)
        !          8275: # ---------------------
        !          8276: # See how the compiler implements dependency checking.
        !          8277: # NAME is "CC", "CXX" or "OBJC".
        !          8278: # We try a few techniques and use that to set a single cache variable.
        !          8279: #
        !          8280: # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
        !          8281: # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
        !          8282: # dependency, and given that the user is not expected to run this macro,
        !          8283: # just rely on AC_PROG_CC.
        !          8284: AC_DEFUN([_AM_DEPENDENCIES],
        !          8285: [AC_REQUIRE([AM_SET_DEPDIR])dnl
        !          8286: AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
        !          8287: AC_REQUIRE([AM_MAKE_INCLUDE])dnl
        !          8288: AC_REQUIRE([AM_DEP_TRACK])dnl
        !          8289:
        !          8290: ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        !          8291:        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        !          8292:        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
        !          8293:        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
        !          8294:                    [depcc="$$1"   am_compiler_list=])
        !          8295:
        !          8296: AC_CACHE_CHECK([dependency style of $depcc],
        !          8297:                [am_cv_$1_dependencies_compiler_type],
        !          8298: [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
        !          8299:   # We make a subdir and do the tests there.  Otherwise we can end up
        !          8300:   # making bogus files that we don't know about and never remove.  For
        !          8301:   # instance it was reported that on HP-UX the gcc test will end up
        !          8302:   # making a dummy file named `D' -- because `-MD' means `put the output
        !          8303:   # in D'.
        !          8304:   mkdir conftest.dir
        !          8305:   # Copy depcomp to subdir because otherwise we won't find it if we're
        !          8306:   # using a relative directory.
        !          8307:   cp "$am_depcomp" conftest.dir
        !          8308:   cd conftest.dir
        !          8309:
        !          8310:   am_cv_$1_dependencies_compiler_type=none
        !          8311:   if test "$am_compiler_list" = ""; then
        !          8312:      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
        !          8313:   fi
        !          8314:   for depmode in $am_compiler_list; do
        !          8315:     # We need to recreate these files for each test, as the compiler may
        !          8316:     # overwrite some of them when testing with obscure command lines.
        !          8317:     # This happens at least with the AIX C compiler.
        !          8318:     echo '#include "conftest.h"' > conftest.c
        !          8319:     echo 'int i;' > conftest.h
        !          8320:     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
        !          8321:
        !          8322:     case $depmode in
        !          8323:     nosideeffect)
        !          8324:       # after this tag, mechanisms are not by side-effect, so they'll
        !          8325:       # only be used when explicitly requested
        !          8326:       if test "x$enable_dependency_tracking" = xyes; then
        !          8327:        continue
        !          8328:       else
        !          8329:        break
        !          8330:       fi
        !          8331:       ;;
        !          8332:     none) break ;;
        !          8333:     esac
        !          8334:     # We check with `-c' and `-o' for the sake of the "dashmstdout"
        !          8335:     # mode.  It turns out that the SunPro C++ compiler does not properly
        !          8336:     # handle `-M -o', and we need to detect this.
        !          8337:     if depmode=$depmode \
        !          8338:        source=conftest.c object=conftest.o \
        !          8339:        depfile=conftest.Po tmpdepfile=conftest.TPo \
        !          8340:        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
        !          8341:        grep conftest.h conftest.Po > /dev/null 2>&1 &&
        !          8342:        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
        !          8343:       am_cv_$1_dependencies_compiler_type=$depmode
        !          8344:       break
        !          8345:     fi
        !          8346:   done
        !          8347:
        !          8348:   cd ..
        !          8349:   rm -rf conftest.dir
        !          8350: else
        !          8351:   am_cv_$1_dependencies_compiler_type=none
        !          8352: fi
        !          8353: ])
        !          8354: $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
        !          8355: AC_SUBST([$1DEPMODE])
        !          8356: ])
        !          8357:
        !          8358:
        !          8359: # AM_SET_DEPDIR
        !          8360: # -------------
        !          8361: # Choose a directory name for dependency files.
        !          8362: # This macro is AC_REQUIREd in _AM_DEPENDENCIES
        !          8363: AC_DEFUN([AM_SET_DEPDIR],
        !          8364: [rm -f .deps 2>/dev/null
        !          8365: mkdir .deps 2>/dev/null
        !          8366: if test -d .deps; then
        !          8367:   DEPDIR=.deps
        !          8368: else
        !          8369:   # MS-DOS does not allow filenames that begin with a dot.
        !          8370:   DEPDIR=_deps
        !          8371: fi
        !          8372: rmdir .deps 2>/dev/null
        !          8373: AC_SUBST(DEPDIR)
        !          8374: ])
        !          8375:
        !          8376:
        !          8377: # AM_DEP_TRACK
        !          8378: # ------------
        !          8379: AC_DEFUN([AM_DEP_TRACK],
        !          8380: [AC_ARG_ENABLE(dependency-tracking,
        !          8381: [  --disable-dependency-tracking Speeds up one-time builds
        !          8382:   --enable-dependency-tracking  Do not reject slow dependency extractors])
        !          8383: if test "x$enable_dependency_tracking" != xno; then
        !          8384:   am_depcomp="$ac_aux_dir/depcomp"
        !          8385:   AMDEPBACKSLASH='\'
        !          8386: fi
        !          8387: AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
        !          8388: pushdef([subst], defn([AC_SUBST]))
        !          8389: subst(AMDEPBACKSLASH)
        !          8390: popdef([subst])
        !          8391: ])
        !          8392:
        !          8393: # Generate code to set up dependency tracking.
        !          8394: # This macro should only be invoked once -- use via AC_REQUIRE.
        !          8395: # Usage:
        !          8396: # AM_OUTPUT_DEPENDENCY_COMMANDS
        !          8397:
        !          8398: #
        !          8399: # This code is only required when automatic dependency tracking
        !          8400: # is enabled.  FIXME.  This creates each `.P' file that we will
        !          8401: # need in order to bootstrap the dependency handling code.
        !          8402: AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
        !          8403: AC_OUTPUT_COMMANDS([
        !          8404: test x"$AMDEP_TRUE" != x"" ||
        !          8405: for mf in $CONFIG_FILES; do
        !          8406:   case "$mf" in
        !          8407:   Makefile) dirpart=.;;
        !          8408:   */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
        !          8409:   *) continue;;
        !          8410:   esac
        !          8411:   grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
        !          8412:   # Extract the definition of DEP_FILES from the Makefile without
        !          8413:   # running `make'.
        !          8414:   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
        !          8415:   test -z "$DEPDIR" && continue
        !          8416:   # When using ansi2knr, U may be empty or an underscore; expand it
        !          8417:   U=`sed -n -e '/^U = / s///p' < "$mf"`
        !          8418:   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
        !          8419:   # We invoke sed twice because it is the simplest approach to
        !          8420:   # changing $(DEPDIR) to its actual value in the expansion.
        !          8421:   for file in `sed -n -e '
        !          8422:     /^DEP_FILES = .*\\\\$/ {
        !          8423:       s/^DEP_FILES = //
        !          8424:       :loop
        !          8425:        s/\\\\$//
        !          8426:        p
        !          8427:        n
        !          8428:        /\\\\$/ b loop
        !          8429:       p
        !          8430:     }
        !          8431:     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
        !          8432:        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
        !          8433:     # Make sure the directory exists.
        !          8434:     test -f "$dirpart/$file" && continue
        !          8435:     fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
        !          8436:     $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
        !          8437:     # echo "creating $dirpart/$file"
        !          8438:     echo '# dummy' > "$dirpart/$file"
        !          8439:   done
        !          8440: done
        !          8441: ], [AMDEP_TRUE="$AMDEP_TRUE"
        !          8442: ac_aux_dir="$ac_aux_dir"])])
        !          8443:
        !          8444: # AM_MAKE_INCLUDE()
        !          8445: # -----------------
        !          8446: # Check to see how make treats includes.
        !          8447: AC_DEFUN([AM_MAKE_INCLUDE],
        !          8448: [am_make=${MAKE-make}
        !          8449: cat > confinc << 'END'
        !          8450: doit:
        !          8451:        @echo done
        !          8452: END
        !          8453: # If we don't find an include directive, just comment out the code.
        !          8454: AC_MSG_CHECKING([for style of include used by $am_make])
        !          8455: am__include='#'
        !          8456: am__quote=
        !          8457: _am_result=none
        !          8458: # First try GNU make style include.
        !          8459: echo "include confinc" > confmf
        !          8460: # We grep out `Entering directory' and `Leaving directory'
        !          8461: # messages which can occur if `w' ends up in MAKEFLAGS.
        !          8462: # In particular we don't look at `^make:' because GNU make might
        !          8463: # be invoked under some other name (usually "gmake"), in which
        !          8464: # case it prints its new name instead of `make'.
        !          8465: if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
        !          8466:    am__include=include
        !          8467:    am__quote=
        !          8468:    _am_result=GNU
        !          8469: fi
        !          8470: # Now try BSD make style include.
        !          8471: if test "$am__include" = "#"; then
        !          8472:    echo '.include "confinc"' > confmf
        !          8473:    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
        !          8474:       am__include=.include
        !          8475:       am__quote='"'
        !          8476:       _am_result=BSD
        !          8477:    fi
        !          8478: fi
        !          8479: AC_SUBST(am__include)
        !          8480: AC_SUBST(am__quote)
        !          8481: AC_MSG_RESULT($_am_result)
        !          8482: rm -f confinc confmf
        !          8483: ])
        !          8484:
        !          8485: # serial 3
        !          8486:
        !          8487: # AM_CONDITIONAL(NAME, SHELL-CONDITION)
        !          8488: # -------------------------------------
        !          8489: # Define a conditional.
        !          8490: #
        !          8491: # FIXME: Once using 2.50, use this:
        !          8492: # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
        !          8493: AC_DEFUN([AM_CONDITIONAL],
        !          8494: [ifelse([$1], [TRUE],
        !          8495:         [errprint(__file__:__line__: [$0: invalid condition: $1
        !          8496: ])dnl
        !          8497: m4exit(1)])dnl
        !          8498: ifelse([$1], [FALSE],
        !          8499:        [errprint(__file__:__line__: [$0: invalid condition: $1
        !          8500: ])dnl
        !          8501: m4exit(1)])dnl
        !          8502: AC_SUBST([$1_TRUE])
        !          8503: AC_SUBST([$1_FALSE])
        !          8504: if $2; then
        !          8505:   $1_TRUE=
        !          8506:   $1_FALSE='#'
        !          8507: else
        !          8508:   $1_TRUE='#'
        !          8509:   $1_FALSE=
        !          8510: fi])
        !          8511:
        !          8512: # Like AC_CONFIG_HEADER, but automatically create stamp file.
        !          8513:
        !          8514: # serial 3
        !          8515:
        !          8516: # When config.status generates a header, we must update the stamp-h file.
        !          8517: # This file resides in the same directory as the config header
        !          8518: # that is generated.  We must strip everything past the first ":",
        !          8519: # and everything past the last "/".
        !          8520:
        !          8521: AC_PREREQ([2.12])
        !          8522:
        !          8523: AC_DEFUN([AM_CONFIG_HEADER],
        !          8524: [ifdef([AC_FOREACH],dnl
        !          8525:         [dnl init our file count if it isn't already
        !          8526:         m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
        !          8527:         dnl prepare to store our destination file list for use in config.status
        !          8528:         AC_FOREACH([_AM_File], [$1],
        !          8529:                    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
        !          8530:                    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
        !          8531:                    dnl and add it to the list of files AC keeps track of, along
        !          8532:                    dnl with our hook
        !          8533:                    AC_CONFIG_HEADERS(_AM_File,
        !          8534: dnl COMMANDS, [, INIT-CMDS]
        !          8535: [# update the timestamp
        !          8536: echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
        !          8537: ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
        !          8538:                    m4_popdef([_AM_Dest])])],dnl
        !          8539: [AC_CONFIG_HEADER([$1])
        !          8540:   AC_OUTPUT_COMMANDS(
        !          8541:    ifelse(patsubst([$1], [[^ ]], []),
        !          8542:          [],
        !          8543:          [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
        !          8544:           patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
        !          8545: [am_indx=1
        !          8546: for am_file in $1; do
        !          8547:   case " \$CONFIG_HEADERS " in
        !          8548:   *" \$am_file "*)
        !          8549:     am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
        !          8550:     if test -n "\$am_dir"; then
        !          8551:       am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
        !          8552:       for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
        !          8553:         am_tmpdir=\$am_tmpdir\$am_subdir/
        !          8554:         if test ! -d \$am_tmpdir; then
        !          8555:           mkdir \$am_tmpdir
        !          8556:         fi
        !          8557:       done
        !          8558:     fi
        !          8559:     echo timestamp > "\$am_dir"stamp-h\$am_indx
        !          8560:     ;;
        !          8561:   esac
        !          8562:   am_indx=\`expr \$am_indx + 1\`
        !          8563: done])
        !          8564: ])]) # AM_CONFIG_HEADER
        !          8565:
        !          8566: # _AM_DIRNAME(PATH)
        !          8567: # -----------------
        !          8568: # Like AS_DIRNAME, only do it during macro expansion
        !          8569: AC_DEFUN([_AM_DIRNAME],
        !          8570:        [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
        !          8571:              m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
        !          8572:                    m4_if(m4_regexp([$1], [^/.*]), -1,
        !          8573:                          [.],
        !          8574:                          m4_patsubst([$1], [^\(/\).*], [\1])),
        !          8575:                    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
        !          8576:              m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
        !          8577: ]) # _AM_DIRNAME
        !          8578:
        !          8579: # Add --enable-maintainer-mode option to configure.
        !          8580: # From Jim Meyering
        !          8581:
        !          8582: # serial 1
        !          8583:
        !          8584: AC_DEFUN([AM_MAINTAINER_MODE],
        !          8585: [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
        !          8586:   dnl maintainer-mode is disabled by default
        !          8587:   AC_ARG_ENABLE(maintainer-mode,
        !          8588: [  --enable-maintainer-mode enable make rules and dependencies not useful
        !          8589:                           (and sometimes confusing) to the casual installer],
        !          8590:       USE_MAINTAINER_MODE=$enableval,
        !          8591:       USE_MAINTAINER_MODE=no)
        !          8592:   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
        !          8593:   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
        !          8594:   MAINT=$MAINTAINER_MODE_TRUE
        !          8595:   AC_SUBST(MAINT)dnl
        !          8596: ]
        !          8597: )
        !          8598:
        !          8599:
        !          8600: # serial 1
        !          8601:
        !          8602: AC_DEFUN([AM_C_PROTOTYPES],
        !          8603: [AC_REQUIRE([AM_PROG_CC_STDC])
        !          8604: AC_REQUIRE([AC_PROG_CPP])
        !          8605: AC_MSG_CHECKING([for function prototypes])
        !          8606: if test "$am_cv_prog_cc_stdc" != no; then
        !          8607:   AC_MSG_RESULT(yes)
        !          8608:   AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
        !          8609:   U= ANSI2KNR=
        !          8610: else
        !          8611:   AC_MSG_RESULT(no)
        !          8612:   U=_ ANSI2KNR=./ansi2knr
        !          8613: fi
        !          8614: # Ensure some checks needed by ansi2knr itself.
        !          8615: AC_HEADER_STDC
        !          8616: AC_CHECK_HEADERS(string.h)
        !          8617: AC_SUBST(U)dnl
        !          8618: AC_SUBST(ANSI2KNR)dnl
        !          8619: ])
        !          8620:
        !          8621:
        !          8622: # serial 1
        !          8623:
        !          8624: # @defmac AC_PROG_CC_STDC
        !          8625: # @maindex PROG_CC_STDC
        !          8626: # @ovindex CC
        !          8627: # If the C compiler in not in ANSI C mode by default, try to add an option
        !          8628: # to output variable @code{CC} to make it so.  This macro tries various
        !          8629: # options that select ANSI C on some system or another.  It considers the
        !          8630: # compiler to be in ANSI C mode if it handles function prototypes correctly.
        !          8631: #
        !          8632: # If you use this macro, you should check after calling it whether the C
        !          8633: # compiler has been set to accept ANSI C; if not, the shell variable
        !          8634: # @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
        !          8635: # code in ANSI C, you can make an un-ANSIfied copy of it by using the
        !          8636: # program @code{ansi2knr}, which comes with Ghostscript.
        !          8637: # @end defmac
        !          8638:
        !          8639: AC_DEFUN([AM_PROG_CC_STDC],
        !          8640: [AC_REQUIRE([AC_PROG_CC])
        !          8641: AC_BEFORE([$0], [AC_C_INLINE])
        !          8642: AC_BEFORE([$0], [AC_C_CONST])
        !          8643: dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
        !          8644: dnl a magic option to avoid problems with ANSI preprocessor commands
        !          8645: dnl like #elif.
        !          8646: dnl FIXME: can't do this because then AC_AIX won't work due to a
        !          8647: dnl circular dependency.
        !          8648: dnl AC_BEFORE([$0], [AC_PROG_CPP])
        !          8649: AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
        !          8650: AC_CACHE_VAL(am_cv_prog_cc_stdc,
        !          8651: [am_cv_prog_cc_stdc=no
        !          8652: ac_save_CC="$CC"
        !          8653: # Don't try gcc -ansi; that turns off useful extensions and
        !          8654: # breaks some systems' header files.
        !          8655: # AIX                  -qlanglvl=ansi
        !          8656: # Ultrix and OSF/1     -std1
        !          8657: # HP-UX 10.20 and later        -Ae
        !          8658: # HP-UX older versions -Aa -D_HPUX_SOURCE
        !          8659: # SVR4                 -Xc -D__EXTENSIONS__
        !          8660: for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
        !          8661: do
        !          8662:   CC="$ac_save_CC $ac_arg"
        !          8663:   AC_TRY_COMPILE(
        !          8664: [#include <stdarg.h>
        !          8665: #include <stdio.h>
        !          8666: #include <sys/types.h>
        !          8667: #include <sys/stat.h>
        !          8668: /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
        !          8669: struct buf { int x; };
        !          8670: FILE * (*rcsopen) (struct buf *, struct stat *, int);
        !          8671: static char *e (p, i)
        !          8672:      char **p;
        !          8673:      int i;
        !          8674: {
        !          8675:   return p[i];
        !          8676: }
        !          8677: static char *f (char * (*g) (char **, int), char **p, ...)
        !          8678: {
        !          8679:   char *s;
        !          8680:   va_list v;
        !          8681:   va_start (v,p);
        !          8682:   s = g (p, va_arg (v,int));
        !          8683:   va_end (v);
        !          8684:   return s;
        !          8685: }
        !          8686: int test (int i, double x);
        !          8687: struct s1 {int (*f) (int a);};
        !          8688: struct s2 {int (*f) (double a);};
        !          8689: int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
        !          8690: int argc;
        !          8691: char **argv;
        !          8692: ], [
        !          8693: return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
        !          8694: ],
        !          8695: [am_cv_prog_cc_stdc="$ac_arg"; break])
        !          8696: done
        !          8697: CC="$ac_save_CC"
        !          8698: ])
        !          8699: if test -z "$am_cv_prog_cc_stdc"; then
        !          8700:   AC_MSG_RESULT([none needed])
        !          8701: else
        !          8702:   AC_MSG_RESULT([$am_cv_prog_cc_stdc])
        !          8703: fi
        !          8704: case "x$am_cv_prog_cc_stdc" in
        !          8705:   x|xno) ;;
        !          8706:   *) CC="$CC $am_cv_prog_cc_stdc" ;;
        !          8707: esac
        !          8708: ])
1.1       maekawa  8709:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>