Annotation of libwww/config/ltconfig, revision 1.2

1.1       frystyk     1: #! /bin/sh
                      2: 
                      3: # ltconfig - Create a system-specific libtool.
1.2     ! frystyk     4: # Copyright (C) 1996-1998 Free Software Foundation, Inc.
1.1       frystyk     5: # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
                      6: #
                      7: # This file is free software; you can redistribute it and/or modify it
                      8: # under the terms of the GNU General Public License as published by
                      9: # the Free Software Foundation; either version 2 of the License, or
                     10: # (at your option) any later version.
                     11: #
                     12: # This program is distributed in the hope that it will be useful, but
                     13: # WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
                     15: # General Public License for more details.
                     16: #
                     17: # You should have received a copy of the GNU General Public License
                     18: # along with this program; if not, write to the Free Software
                     19: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
                     20: #
                     21: # As a special exception to the GNU General Public License, if you
                     22: # distribute this file as part of a program that contains a
                     23: # configuration script generated by Autoconf, you may include it under
                     24: # the same distribution terms that you use for the rest of that program.
                     25: 
                     26: # A lot of this script is taken from autoconf-2.10.
                     27: 
1.2     ! frystyk    28: # The HP-UX ksh and POSIX shell print the target directory to stdout
        !            29: # if CDPATH is set.
        !            30: if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
        !            31: 
        !            32: echo=echo
        !            33: if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
        !            34: else
        !            35:   # The Solaris and AIX default echo program unquotes backslashes.
        !            36:   # This makes it impossible to quote backslashes using
        !            37:   #   echo "$something" | sed 's/\\/\\\\/g'
        !            38:   # So, we emulate echo with printf '%s\n'
        !            39:   echo="printf %s\\n"
        !            40:   if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
        !            41:   else
        !            42:     # Oops.  We have no working printf.  Try to find a not-so-buggy echo.
        !            43:     echo=echo
        !            44:     IFS="${IFS=        }"; save_ifs="$IFS"; IFS="${IFS}:"
        !            45:     for dir in $PATH /usr/ucb; do
        !            46:       if test -f $dir/echo && test "X`$dir/echo '\t'`" = 'X\t'; then
        !            47:         echo="$dir/echo"
        !            48:         break
        !            49:       fi
        !            50:     done
        !            51:     IFS="$save_ifs"
        !            52:   fi
        !            53: fi
        !            54: 
        !            55: # Sed substitution that helps us do robust quoting.  It backslashifies
        !            56: # metacharacters that are still active within double-quoted strings.
        !            57: Xsed='sed -e s/^X//'
        !            58: sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
        !            59: 
        !            60: # Same as above, but do not quote variable references.
        !            61: double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
        !            62: 
1.1       frystyk    63: # The name of this program.
1.2     ! frystyk    64: progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
1.1       frystyk    65: 
                     66: # Constants:
                     67: PROGRAM=ltconfig
                     68: PACKAGE=libtool
1.2     ! frystyk    69: VERSION=1.1
1.1       frystyk    70: ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
1.2     ! frystyk    71: ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
1.1       frystyk    72: rm="rm -f"
                     73: 
                     74: help="Try \`$progname --help' for more information."
                     75: 
                     76: # Global variables:
                     77: can_build_shared=yes
                     78: enable_shared=yes
                     79: # All known linkers require a `.a' archive for static linking.
                     80: enable_static=yes
                     81: ltmain=
                     82: silent=
                     83: srcdir=
                     84: ac_config_guess=
                     85: ac_config_sub=
                     86: host=
                     87: nonopt=
                     88: verify_host=yes
                     89: with_gcc=no
                     90: with_gnu_ld=no
                     91: 
                     92: old_AR="$AR"
                     93: old_CC="$CC"
                     94: old_CFLAGS="$CFLAGS"
                     95: old_CPPFLAGS="$CPPFLAGS"
                     96: old_LD="$LD"
                     97: old_LN_S="$LN_S"
1.2     ! frystyk    98: old_NM="$NM"
1.1       frystyk    99: old_RANLIB="$RANLIB"
                    100: 
                    101: # Parse the command line options.
                    102: args=
                    103: prev=
                    104: for option
                    105: do
                    106:   case "$option" in
                    107:   -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
                    108:   *) optarg= ;;
                    109:   esac
                    110: 
                    111:   # If the previous option needs an argument, assign it.
                    112:   if test -n "$prev"; then
                    113:     eval "$prev=\$option"
                    114:     prev=
                    115:     continue
                    116:   fi
                    117: 
                    118:   case "$option" in
                    119:   --help) cat <<EOM
                    120: Usage: $progname [OPTION]... LTMAIN [HOST]
                    121: 
                    122: Generate a system-specific libtool script.
                    123: 
                    124:     --disable-shared       do not build shared libraries
                    125:     --disable-static       do not build static libraries
                    126:     --help                 display this help and exit
                    127:     --no-verify            do not verify that HOST is a valid host type
                    128:     --quiet                same as \`--silent'
1.2     ! frystyk   129:     --silent               do not print informational messages
1.1       frystyk   130:     --srcdir=DIR           find \`config.guess' in DIR
                    131:     --version              output version information and exit
                    132:     --with-gcc             assume that the GNU C compiler will be used
                    133:     --with-gnu-ld          assume that the C compiler uses the GNU linker
                    134: 
                    135: LTMAIN is the \`ltmain.sh' shell script fragment that provides basic libtool
                    136: functionality.
                    137: 
                    138: HOST is the canonical host system name [default=guessed].
                    139: EOM
                    140:   exit 0
                    141:   ;;
                    142: 
                    143:   --disable-shared) enable_shared=no ;;
                    144: 
                    145:   --disable-static) enable_static=no ;;
                    146: 
                    147:   --quiet | --silent) silent=yes ;;
                    148: 
                    149:   --srcdir) prev=srcdir ;;
                    150:   --srcdir=*) srcdir="$optarg" ;;
                    151: 
                    152:   --no-verify) verify_host=no ;;
                    153: 
                    154:   --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
                    155: 
                    156:   --with-gcc) with_gcc=yes ;;
                    157:   --with-gnu-ld) with_gnu_ld=yes ;;
                    158: 
                    159:   -*)
                    160:     echo "$progname: unrecognized option \`$option'" 1>&2
                    161:     echo "$help" 1>&2
                    162:     exit 1
                    163:     ;;
                    164: 
                    165:   *)
                    166:     if test -z "$ltmain"; then
                    167:       ltmain="$option"
                    168:     elif test -z "$host"; then
1.2     ! frystyk   169: # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
1.1       frystyk   170: #      if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
                    171: #        echo "$progname: warning \`$option' is not a valid host type" 1>&2
                    172: #      fi
                    173:       host="$option"
                    174:     else
                    175:       echo "$progname: too many arguments" 1>&2
                    176:       echo "$help" 1>&2
                    177:       exit 1
                    178:     fi ;;
                    179:   esac
                    180: done
                    181: 
                    182: if test -z "$ltmain"; then
                    183:   echo "$progname: you must specify a LTMAIN file" 1>&2
                    184:   echo "$help" 1>&2
                    185:   exit 1
                    186: fi
                    187: 
                    188: if test -f "$ltmain"; then :
                    189: else
1.2     ! frystyk   190:   echo "$progname: \`$ltmain' does not exist" 1>&2
        !           191:   echo "$help" 1>&2
        !           192:   exit 1
1.1       frystyk   193: fi
                    194: 
                    195: # Quote any args containing shell metacharacters.
                    196: ltconfig_args=
                    197: for arg
                    198: do
                    199:   case "$arg" in
                    200:   *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
                    201:   ltconfig_args="$ltconfig_args '$arg'" ;;
                    202:   *) ltconfig_args="$ltconfig_args $arg" ;;
                    203:   esac
                    204: done
                    205: 
                    206: # A relevant subset of AC_INIT.
                    207: 
                    208: # File descriptor usage:
                    209: # 0 standard input
                    210: # 1 file creation
                    211: # 2 errors and warnings
                    212: # 3 some systems may open it to /dev/tty
                    213: # 4 used on the Kubota Titan
                    214: # 5 compiler messages saved in config.log
                    215: # 6 checking for... messages and results
                    216: if test "$silent" = yes; then
                    217:   exec 6>/dev/null
                    218: else
                    219:   exec 6>&1
                    220: fi
                    221: exec 5>>./config.log
                    222: 
                    223: # NLS nuisances.
                    224: # Only set LANG and LC_ALL to C if already set.
                    225: # These must not be set unconditionally because not all systems understand
                    226: # e.g. LANG=C (notably SCO).
                    227: if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
                    228: if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
                    229: 
                    230: if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
                    231:   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
                    232:   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
                    233:     ac_n= ac_c='
                    234: ' ac_t='       '
                    235:   else
                    236:     ac_n=-n ac_c= ac_t=
                    237:   fi
                    238: else
                    239:   ac_n= ac_c='\c' ac_t=
                    240: fi
                    241: 
                    242: if test -z "$srcdir"; then
                    243:   # Assume the source directory is the same one as the path to ltmain.sh.
1.2     ! frystyk   244:   srcdir=`$echo "$ltmain" | $Xsed -e 's%/[^/]*$%%'`
1.1       frystyk   245:   test "$srcdir" = "$ltmain" && srcdir=.
                    246: fi
                    247: 
1.2     ! frystyk   248: trap "$rm conftest*; exit 1" 1 2 15
1.1       frystyk   249: if test "$verify_host" = yes; then
                    250:   # Check for config.guess and config.sub.
                    251:   ac_aux_dir=
                    252:   for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
                    253:     if test -f $ac_dir/config.guess; then
                    254:       ac_aux_dir=$ac_dir
                    255:       break
                    256:     fi
                    257:   done
                    258:   if test -z "$ac_aux_dir"; then
                    259:     echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
                    260:     echo "$help" 1>&2
                    261:     exit 1
                    262:   fi
                    263:   ac_config_guess=$ac_aux_dir/config.guess
                    264:   ac_config_sub=$ac_aux_dir/config.sub
                    265: 
                    266:   # Make sure we can run config.sub.
                    267:   if $ac_config_sub sun4 >/dev/null 2>&1; then :
                    268:   else
                    269:     echo "$progname: cannot run $ac_config_sub" 1>&2
                    270:     echo "$help" 1>&2
                    271:     exit 1
                    272:   fi
                    273: 
                    274:   echo $ac_n "checking host system type""... $ac_c" 1>&6
                    275: 
                    276:   host_alias=$host
                    277:   case "$host_alias" in
                    278:   "")
                    279:     if host_alias=`$ac_config_guess`; then :
                    280:     else
                    281:       echo "$progname: cannot guess host type; you must specify one" 1>&2
                    282:       echo "$help" 1>&2
                    283:       exit 1
                    284:     fi ;;
                    285:   esac
                    286:   host=`$ac_config_sub $host_alias`
1.2     ! frystyk   287:   echo "$ac_t$host" 1>&6
        !           288: 
        !           289:   # Make sure the host verified.
        !           290:   test -z "$host" && exit 1
1.1       frystyk   291: 
                    292: elif test -z "$host"; then
                    293:   echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
                    294:   echo "$help" 1>&2
                    295:   exit 1
                    296: else
                    297:   host_alias=$host
                    298: fi
                    299: 
1.2     ! frystyk   300: # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
        !           301: case "$host_os" in
        !           302: linux-gnu*) ;;
        !           303: linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1.1       frystyk   304: esac
                    305: 
                    306: host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
                    307: host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
                    308: host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
                    309: 
1.2     ! frystyk   310: case "$host_os" in
        !           311: aix3*)
        !           312:   # AIX sometimes has problems with the GCC collect2 program.  For some
        !           313:   # reason, if we set the COLLECT_NAMES environment variable, the problems
        !           314:   # vanish in a puff of smoke.
        !           315:   if test "${COLLECT_NAMES+set}" != set; then
        !           316:     COLLECT_NAMES=
        !           317:     export COLLECT_NAMES
        !           318:   fi
        !           319:   ;;
        !           320: esac
        !           321: 
1.1       frystyk   322: # Determine commands to create old-style static archives.
                    323: old_archive_cmds='$AR cru $oldlib$oldobjs'
                    324: old_postinstall_cmds='chmod 644 $oldlib'
1.2     ! frystyk   325: old_postuninstall_cmds=
        !           326: 
        !           327: # Set a sane default for `AR'.
        !           328: test -z "$AR" && AR=ar
1.1       frystyk   329: 
                    330: # If RANLIB is not set, then run the test.
                    331: if test "${RANLIB+set}" != "set"; then
                    332:   result=no
                    333: 
                    334:   echo $ac_n "checking for ranlib... $ac_c" 1>&6
                    335:   IFS="${IFS=  }"; save_ifs="$IFS"; IFS="${IFS}:"
                    336:   for dir in $PATH; do
                    337:     test -z "$dir" && dir=.
                    338:     if test -f $dir/ranlib; then
                    339:       RANLIB="ranlib"
                    340:       result="ranlib"
                    341:       break
                    342:     fi
                    343:   done
                    344:   IFS="$save_ifs"
                    345: 
1.2     ! frystyk   346:   echo "$ac_t$result" 1>&6
1.1       frystyk   347: fi
                    348: 
                    349: if test -n "$RANLIB"; then
                    350:   old_archive_cmds="$old_archive_cmds;\$RANLIB \$oldlib"
1.2     ! frystyk   351:   old_postinstall_cmds="\$RANLIB \$oldlib;$old_postinstall_cmds"
1.1       frystyk   352: fi
                    353: 
                    354: # Check to see if we are using GCC.
                    355: if test "$with_gcc" != yes || test -z "$CC"; then
                    356:   # If CC is not set, then try to find GCC or a usable CC.
                    357:   if test -z "$CC"; then
                    358:     echo $ac_n "checking for gcc... $ac_c" 1>&6
                    359:     IFS="${IFS=        }"; save_ifs="$IFS"; IFS="${IFS}:"
                    360:     for dir in $PATH; do
                    361:       IFS="$save_ifs"
                    362:       test -z "$dir" && dir=.
                    363:       if test -f $dir/gcc; then
                    364:        CC="gcc"
                    365:        break
                    366:       fi
                    367:     done
                    368:     IFS="$save_ifs"
                    369: 
                    370:     if test -n "$CC"; then
1.2     ! frystyk   371:       echo "$ac_t$CC" 1>&6
1.1       frystyk   372:     else
1.2     ! frystyk   373:       echo "$ac_t"no 1>&6
1.1       frystyk   374:     fi
                    375:   fi
                    376: 
                    377:   # Not "gcc", so try "cc", rejecting "/usr/ucb/cc".
                    378:   if test -z "$CC"; then
                    379:     echo $ac_n "checking for cc... $ac_c" 1>&6
                    380:     IFS="${IFS=        }"; save_ifs="$IFS"; IFS="${IFS}:"
                    381:     cc_rejected=no
                    382:     for dir in $PATH; do
                    383:       test -z "$dir" && dir=.
                    384:       if test -f $dir/cc; then
                    385:        if test "$dir/cc" = "/usr/ucb/cc"; then
                    386:          cc_rejected=yes
                    387:          continue
                    388:        fi
                    389:        CC="cc"
                    390:        break
                    391:       fi
                    392:     done
                    393:     IFS="$save_ifs"
                    394:     if test $cc_rejected = yes; then
                    395:       # We found a bogon in the path, so make sure we never use it.
                    396:       set dummy $CC
                    397:       shift
                    398:       if test $# -gt 0; then
                    399:        # We chose a different compiler from the bogus one.
                    400:        # However, it has the same name, so the bogon will be chosen
                    401:        # first if we set CC to just the name; use the full file name.
                    402:        shift
                    403:        set dummy "$dir/cc" "$@"
                    404:        shift
                    405:        CC="$@"
                    406:       fi
                    407:     fi
                    408: 
                    409:     if test -n "$CC"; then
1.2     ! frystyk   410:       echo "$ac_t$CC" 1>&6
1.1       frystyk   411:     else
1.2     ! frystyk   412:       echo "$ac_t"no 1>&6
1.1       frystyk   413:     fi
                    414: 
                    415:     if test -z "$CC"; then
                    416:       echo "$progname: error: no acceptable cc found in \$PATH" 1>&2
                    417:       exit 1
                    418:     fi
                    419:   fi
                    420: 
                    421:   # Now see if the compiler is really GCC.
                    422:   with_gcc=no
                    423:   echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6
1.2     ! frystyk   424:   echo "$progname:424: checking whether we are using GNU C" >&5
1.1       frystyk   425: 
                    426:   $rm conftest.c
                    427:   cat > conftest.c <<EOF
                    428: #ifdef __GNUC__
                    429:   yes;
                    430: #endif
                    431: EOF
1.2     ! frystyk   432:   if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1.1       frystyk   433:     with_gcc=yes
                    434:   fi
                    435:   $rm conftest.c
1.2     ! frystyk   436:   echo "$ac_t$with_gcc" 1>&6
1.1       frystyk   437: fi
                    438: 
                    439: # Allow CC to be a program name with arguments.
                    440: set dummy $CC
                    441: compiler="$2"
                    442: 
                    443: echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
                    444: pic_flag=
                    445: special_shlib_compile_flags=
                    446: wl=
                    447: link_static_flag=
1.2     ! frystyk   448: no_builtin_flag=
1.1       frystyk   449: 
                    450: if test "$with_gcc" = yes; then
                    451:   wl='-Wl,'
                    452:   link_static_flag='-static'
1.2     ! frystyk   453:   no_builtin_flag=' -fno-builtin'
        !           454: 
        !           455:   case "$host_os" in
        !           456:   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
        !           457:     # PIC is the default for these OSes.
        !           458:     ;;
        !           459:   os2*)
        !           460:     # We can build DLLs from non-PIC.
        !           461:     ;;
        !           462:   amigaos*)
        !           463:     # FIXME: we need at least 68020 code to build shared libraries, but
        !           464:     # adding the `-m68020' flag to GCC prevents building anything better,
        !           465:     # like `-m68040'.
        !           466:     pic_flag='-m68020 -resident32 -malways-restore-a4'
        !           467:     ;;
        !           468:   *)
        !           469:     pic_flag='-fPIC'
        !           470:     ;;
        !           471:   esac
1.1       frystyk   472: else
                    473:   # PORTME Check for PIC flags for the system compiler.
                    474:   case "$host_os" in
                    475:   aix3* | aix4*)
1.2     ! frystyk   476:     # All AIX code is PIC.
1.1       frystyk   477:     link_static_flag='-bnso -bI:/lib/syscalls.exp'
                    478:     ;;
                    479: 
                    480:   hpux9* | hpux10*)
1.2     ! frystyk   481:     # Is there a better link_static_flag that works with the bundled CC?
1.1       frystyk   482:     wl='-Wl,'
1.2     ! frystyk   483:     link_static_flag="${wl}-a ${wl}archive"
1.1       frystyk   484:     pic_flag='+Z'
                    485:     ;;
                    486: 
                    487:   irix5* | irix6*)
                    488:     wl='-Wl,'
                    489:     link_static_flag='-non_shared'
                    490:     # PIC (with -KPIC) is the default.
1.2     ! frystyk   491:     ;;
        !           492: 
        !           493:   os2*)
        !           494:     # We can build DLLs from non-PIC.
1.1       frystyk   495:     ;;
                    496: 
                    497:   osf3* | osf4*)
1.2     ! frystyk   498:     # All OSF/1 code is PIC.
1.1       frystyk   499:     wl='-Wl,'
                    500:     link_static_flag='-non_shared'
                    501:     ;;
                    502: 
                    503:   sco3.2v5*)
                    504:     pic_flag='-Kpic'
                    505:     link_static_flag='-dn'
                    506:     special_shlib_compile_flags='-belf'
                    507:     ;;
                    508: 
                    509:   solaris2*)
                    510:     pic_flag='-KPIC'
                    511:     link_static_flag='-Bstatic'
                    512:     wl='-Wl,'
                    513:     ;;
                    514: 
                    515:   sunos4*)
                    516:     pic_flag='-PIC'
                    517:     link_static_flag='-Bstatic'
                    518:     wl='-Qoption ld '
                    519:     ;;
                    520: 
1.2     ! frystyk   521:   sysv4.2uw2*)
        !           522:     pic_flag='-KPIC'
        !           523:     link_static_flag='-Bstatic'
        !           524:     wl='-Wl,'
        !           525:     ;;
        !           526: 
        !           527:   uts4*)
        !           528:     pic_flag='-pic'
        !           529:     link_static_flag='-Bstatic'
        !           530:     ;;
        !           531: 
1.1       frystyk   532:   *)
                    533:     can_build_shared=no
                    534:     ;;
                    535:   esac
                    536: fi
                    537: 
1.2     ! frystyk   538: if test -n "$pic_flag"; then
        !           539:   echo "$ac_t$pic_flag" 1>&6
1.1       frystyk   540: 
1.2     ! frystyk   541:   # Check to make sure the pic_flag actually works.
        !           542:   echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6
        !           543:   $rm conftest*
        !           544:   echo > conftest.c
        !           545:   save_CFLAGS="$CFLAGS"
        !           546:   CFLAGS="$CFLAGS $pic_flag -DPIC"
        !           547:   echo "$progname:547: checking if $compiler PIC flag $pic_flag works" >&5
        !           548:   if { (eval echo $progname:548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
        !           549:     # Append any errors to the config.log.
        !           550:     cat conftest.err 1>&5
        !           551: 
        !           552:     # On HP-UX, the stripped-down bundled CC does not accept +Z, but also
        !           553:     # reports no error.  So, we need to grep stderr for (Bundled).
        !           554:     if grep '(Bundled)' conftest.err >/dev/null; then
        !           555:       echo "$ac_t"no 1>&6
        !           556:       can_build_shared=no
        !           557:       pic_flag=
        !           558:     else
        !           559:       echo "$ac_t"yes 1>&6
        !           560:       pic_flag=" $pic_flag"
        !           561:     fi
        !           562:   else
        !           563:     # Append any errors to the config.log.
        !           564:     cat conftest.err 1>&5
        !           565:     can_build_shared=no
        !           566:     pic_flag=
        !           567:     echo "$ac_t"no 1>&6
        !           568:   fi
        !           569:   CFLAGS="$save_CFLAGS"
        !           570:   $rm conftest*
1.1       frystyk   571: else
1.2     ! frystyk   572:   echo "$ac_t"none 1>&6
1.1       frystyk   573: fi
                    574: 
                    575: # Check for any special shared library compilation flags.
                    576: if test -n "$special_shlib_compile_flags"; then
                    577:   echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2
                    578:   if echo "$old_CC $old_CFLAGS " | egrep -e "[         ]$special_shlib_compile_flags[  ]" >/dev/null; then :
                    579:   else
                    580:     echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2
                    581:     can_build_shared=no
                    582:   fi
                    583: fi
                    584: 
1.2     ! frystyk   585: echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6
        !           586: $rm conftest*
        !           587: echo 'main(){return(0);}' > conftest.c
        !           588: save_LDFLAGS="$LDFLAGS"
        !           589: LDFLAGS="$LDFLAGS $link_static_flag"
        !           590: echo "$progname:590: checking if $compiler static flag $link_static_flag works" >&5
        !           591: if { (eval echo $progname:591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
        !           592:   echo "$ac_t$link_static_flag" 1>&6
1.1       frystyk   593: else
1.2     ! frystyk   594:   echo "$ac_t"none 1>&6
        !           595:   link_static_flag=
1.1       frystyk   596: fi
1.2     ! frystyk   597: LDFLAGS="$save_LDFLAGS"
        !           598: $rm conftest*
1.1       frystyk   599: 
                    600: if test -z "$LN_S"; then
                    601:   # Check to see if we can use ln -s, or we need hard links.
                    602:   echo $ac_n "checking whether ln -s works... $ac_c" 1>&6
1.2     ! frystyk   603:   $rm conftestdata
1.1       frystyk   604:   if ln -s X conftestdata 2>/dev/null; then
1.2     ! frystyk   605:     $rm conftestdata
1.1       frystyk   606:     LN_S="ln -s"
                    607:   else
                    608:     LN_S=ln
                    609:   fi
                    610:   if test "$LN_S" = "ln -s"; then
                    611:     echo "$ac_t"yes 1>&6
                    612:   else
                    613:     echo "$ac_t"no 1>&6
                    614:   fi
                    615: fi
                    616: 
1.2     ! frystyk   617: # Make sure LD is an absolute path.
        !           618: if test -z "$LD"; then
        !           619:   ac_prog=ld
        !           620:   if test "$with_gcc" = yes; then
        !           621:     # Check if gcc -print-prog-name=ld gives a path.
        !           622:     echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
        !           623:     echo "$progname:623: checking for ld used by GCC" >&5
        !           624:     ac_prog=`($CC -print-prog-name=ld) 2>&5`
        !           625:     case "$ac_prog" in
        !           626:     # Accept absolute paths.
        !           627:     /* | [A-Za-z]:\\*)
        !           628:       test -z "$LD" && LD="$ac_prog"
        !           629:       ;;
        !           630:     "")
        !           631:       # If it fails, then pretend we are not using GCC.
        !           632:       ac_prog=ld
        !           633:       ;;
        !           634:     *)
        !           635:       # If it is relative, then search for the first ld in PATH.
        !           636:       with_gnu_ld=unknown
        !           637:       ;;
        !           638:     esac
        !           639:   elif test "$with_gnu_ld" = yes; then
        !           640:     echo $ac_n "checking for GNU ld... $ac_c" 1>&6
        !           641:     echo "$progname:641: checking for GNU ld" >&5
        !           642:   else
        !           643:     echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
        !           644:     echo "$progname:644: checking for non-GNU ld" >&5
        !           645:   fi
        !           646: 
1.1       frystyk   647:   if test -z "$LD"; then
                    648:     IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
                    649:     for ac_dir in $PATH; do
                    650:       test -z "$ac_dir" && ac_dir=.
1.2     ! frystyk   651:       if test -f "$ac_dir/$ac_prog"; then
        !           652:        LD="$ac_dir/$ac_prog"
1.1       frystyk   653:        # Check to see if the program is GNU ld.  I'd rather use --version,
                    654:        # but apparently some GNU ld's only accept -v.
                    655:        # Break only if it was the GNU/non-GNU ld that we prefer.
1.2     ! frystyk   656:        if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
        !           657:          test "$with_gnu_ld" != no && break
1.1       frystyk   658:        else
                    659:          test "$with_gnu_ld" != yes && break
                    660:        fi
                    661:       fi
                    662:     done
                    663:     IFS="$ac_save_ifs"
1.2     ! frystyk   664:   fi
1.1       frystyk   665: 
1.2     ! frystyk   666:   if test -n "$LD"; then
        !           667:     echo "$ac_t$LD" 1>&6
        !           668:   else
        !           669:     echo "$ac_t"no 1>&6
        !           670:   fi
1.1       frystyk   671: 
1.2     ! frystyk   672:   if test -z "$LD"; then
        !           673:     echo "$progname: error: no acceptable ld found in \$PATH" 1>&2
        !           674:     exit 1
1.1       frystyk   675:   fi
1.2     ! frystyk   676: fi
1.1       frystyk   677: 
1.2     ! frystyk   678: # Check to see if it really is or is not GNU ld.
        !           679: echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6
        !           680: # I'd rather use --version here, but apparently some GNU ld's only accept -v.
        !           681: if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
        !           682:   with_gnu_ld=yes
        !           683: else
        !           684:   with_gnu_ld=no
1.1       frystyk   685: fi
1.2     ! frystyk   686: echo "$ac_t$with_gnu_ld" 1>&6
1.1       frystyk   687: 
                    688: # See if the linker supports building shared libraries.
                    689: echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
                    690: 
                    691: allow_undefined_flag=
1.2     ! frystyk   692: no_undefined_flag=
1.1       frystyk   693: archive_cmds=
1.2     ! frystyk   694: old_archive_from_new_cmds=
        !           695: export_dynamic_flag_spec=
1.1       frystyk   696: hardcode_libdir_flag_spec=
                    697: hardcode_libdir_separator=
                    698: hardcode_direct=no
                    699: hardcode_minus_L=no
                    700: hardcode_shlibpath_var=unsupported
                    701: runpath_var=
                    702: 
1.2     ! frystyk   703: case "$host_os" in
        !           704: amigaos* | sunos4*)
        !           705:   # On these operating systems, we should treat GNU ld like the system ld.
        !           706:   gnu_ld_acts_native=yes
        !           707:   ;;
        !           708: *)
        !           709:   gnu_ld_acts_native=no
        !           710:   ;;
        !           711: esac
        !           712: 
1.1       frystyk   713: ld_shlibs=yes
1.2     ! frystyk   714: if test "$with_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
        !           715: 
1.1       frystyk   716:   # See if GNU ld supports shared libraries.
1.2     ! frystyk   717:   if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
        !           718:     archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs'
        !           719:     runpath_var=LD_RUN_PATH
1.1       frystyk   720:     ld_shlibs=yes
1.2     ! frystyk   721:   else
        !           722:     ld_shlibs=no
        !           723:   fi
1.1       frystyk   724: 
                    725:   if test "$ld_shlibs" = yes; then
1.2     ! frystyk   726:     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
        !           727:     export_dynamic_flag_spec='${wl}--export-dynamic'
1.1       frystyk   728:   fi
                    729: else
                    730:   # PORTME fill in a description of your system's linker (not GNU ld)
                    731:   case "$host_os" in
                    732:   aix3*)
                    733:     allow_undefined_flag=unsupported
1.2     ! frystyk   734:     archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE;$AR cru $lib $objdir/$soname'
1.1       frystyk   735:     # Note: this linker hardcodes the directories in LIBPATH if there
                    736:     # are no directories specified by -L.
                    737:     hardcode_minus_L=yes
1.2     ! frystyk   738:     if test "$with_gcc" = yes && test -z "$link_static_flag"; then
        !           739:       # Neither direct hardcoding nor static linking is supported with a
        !           740:       # broken collect2.
        !           741:       hardcode_direct=unsupported
        !           742:     fi
1.1       frystyk   743:     ;;
                    744: 
                    745:   aix4*)
                    746:     allow_undefined_flag=unsupported
1.2     ! frystyk   747:     archive_cmds='$NM$libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' > $lib.exp;$CC -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry;$AR cru $lib $objdir/$soname'
1.1       frystyk   748:     hardcode_direct=yes
                    749:     hardcode_minus_L=yes
                    750:     ;;
                    751: 
1.2     ! frystyk   752:   amigaos*)
        !           753:     archive_cmds='$rm $objdir/a2ixlibrary.data;$echo "#define NAME $libname" > $objdir/a2ixlibrary.data;$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data;$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data;$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data;$AR cru $lib$libobjs;$RANLIB $lib;(cd $objdir && a2ixlibrary -32)'
        !           754:     hardcode_libdir_flag_spec='-L$libdir'
        !           755:     hardcode_minus_L=yes
        !           756:     ;;
        !           757: 
1.1       frystyk   758:   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
                    759:   # support.  Future versions do this automatically, but an explicit c++rt0.o
1.2     ! frystyk   760:   # does not break anything, and helps significantly (at the cost of a little
1.1       frystyk   761:   # extra space).
                    762:   freebsd2.2*)
1.2     ! frystyk   763:     archive_cmds='$LD -Bshareable -o $lib$libobjs /usr/lib/c++rt0.o'
        !           764:     hardcode_libdir_flag_spec='-R$libdir'
1.1       frystyk   765:     hardcode_direct=yes
                    766:     hardcode_minus_L=yes
                    767:     hardcode_shlibpath_var=no
                    768:     ;;
                    769: 
1.2     ! frystyk   770:   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1.1       frystyk   771:   freebsd2*)
1.2     ! frystyk   772:     archive_cmds='$LD -Bshareable -o $lib$libobjs'
1.1       frystyk   773:     hardcode_direct=yes
                    774:     hardcode_minus_L=yes
                    775:     hardcode_shlibpath_var=no
                    776:     ;;
                    777: 
                    778:   # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
                    779:   freebsd3*)
1.2     ! frystyk   780:     archive_cmds='$CC -shared -o $lib$libobjs'
        !           781:     hardcode_libdir_flag_spec='-R$libdir'
1.1       frystyk   782:     hardcode_direct=yes
1.2     ! frystyk   783:     hardcode_minus_L=yes
1.1       frystyk   784:     hardcode_shlibpath_var=no
                    785:     ;;
                    786: 
                    787:   hpux9*)
1.2     ! frystyk   788:     archive_cmds='$rm $objdir/$soname;$LD -b +s +b $install_libdir -o $objdir/$soname$libobjs;mv $objdir/$soname $lib'
1.1       frystyk   789:     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
                    790:     hardcode_direct=yes
                    791:     hardcode_minus_L=yes
1.2     ! frystyk   792:     export_dynamic_flag_spec='${wl}-E'
1.1       frystyk   793:     ;;
                    794: 
                    795:   hpux10*)
1.2     ! frystyk   796:     archive_cmds='$LD -b +h $soname +s +b $install_libdir -o $lib$libobjs'
1.1       frystyk   797:     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
                    798:     hardcode_direct=yes
                    799:     hardcode_minus_L=yes
1.2     ! frystyk   800:     export_dynamic_flag_spec='${wl}-E'
1.1       frystyk   801:     ;;
                    802: 
                    803:   irix5* | irix6*)
1.2     ! frystyk   804:     archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
1.1       frystyk   805:     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
                    806:     ;;
                    807: 
1.2     ! frystyk   808:   netbsd*)
1.1       frystyk   809:     # Tested with NetBSD 1.2 ld
1.2     ! frystyk   810:     archive_cmds='$LD -Bshareable -o $lib$libobjs'
        !           811:     hardcode_libdir_flag_spec='-R$libdir'
        !           812:     hardcode_direct=yes
        !           813:     hardcode_shlibpath_var=no
        !           814:     ;;
        !           815: 
        !           816:   openbsd*)
        !           817:     archive_cmds='$LD -Bshareable -o $lib$libobjs'
1.1       frystyk   818:     hardcode_libdir_flag_spec='-R$libdir'
                    819:     hardcode_direct=yes
                    820:     hardcode_shlibpath_var=no
                    821:     ;;
                    822: 
1.2     ! frystyk   823:   os2*)
        !           824:     hardcode_libdir_flag_spec='-L$libdir'
        !           825:     hardcode_minus_L=yes
        !           826:     allow_undefined_flag=unsupported
        !           827:     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;$echo DATA >> $objdir/$libname.def;$echo " SINGLE NONSHARED" >> $objdir/$libname.def;$echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
        !           828:     old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
        !           829:     ;;
        !           830: 
1.1       frystyk   831:   osf3* | osf4*)
1.2     ! frystyk   832:     allow_undefined_flag=' -expect_unresolved \*'
        !           833:     archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
1.1       frystyk   834:     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
                    835:     hardcode_libdir_separator=:
                    836:     ;;
                    837: 
                    838:   sco3.2v5*)
1.2     ! frystyk   839:     archive_cmds='$LD -G -o $lib$libobjs'
1.1       frystyk   840:     hardcode_direct=yes
                    841:     ;;
                    842: 
                    843:   solaris2*)
1.2     ! frystyk   844:     no_undefined_flag=' -z text'
        !           845:     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib$libobjs'
1.1       frystyk   846:     hardcode_libdir_flag_spec='-R$libdir'
                    847:     hardcode_shlibpath_var=no
1.2     ! frystyk   848: 
        !           849:     # Solaris 2 before 2.5 hardcodes -L paths.
        !           850:     case "$host_os" in
        !           851:     solaris2.[0-4]*)
        !           852:       hardcode_minus_L=yes
        !           853:       ;;
        !           854:     esac
1.1       frystyk   855:     ;;
                    856: 
                    857:   sunos4*)
1.2     ! frystyk   858:     if test "$with_gcc" = yes; then
        !           859:       archive_cmds='$CC -shared -o $lib$libobjs'
        !           860:     else
        !           861:       archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
        !           862:     fi
        !           863: 
        !           864:     if test "$with_gnu_ld" = yes; then
        !           865:       export_dynamic_flag_spec='${wl}-export-dynamic'
        !           866:     fi
1.1       frystyk   867:     hardcode_libdir_flag_spec='-L$libdir'
                    868:     hardcode_direct=yes
                    869:     hardcode_minus_L=yes
                    870:     hardcode_shlibpath_var=no
                    871:     ;;
                    872: 
1.2     ! frystyk   873:   uts4*)
        !           874:     archive_cmds='$LD -G -h $soname -o $lib$libobjs'
        !           875:     hardcode_libdir_flag_spec='-L$libdir'
        !           876:     hardcode_direct=no
        !           877:     hardcode_minus_L=no
        !           878:     hardcode_shlibpath_var=no
        !           879:     ;;
        !           880: 
1.1       frystyk   881:   *)
                    882:     ld_shlibs=no
                    883:     can_build_shared=no
                    884:     ;;
                    885:   esac
                    886: fi
1.2     ! frystyk   887: echo "$ac_t$ld_shlibs" 1>&6
        !           888: 
        !           889: if test -z "$NM"; then
        !           890:   echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
        !           891:   case "$NM" in
        !           892:   /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path.
        !           893:   *)
        !           894:     IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
        !           895:     for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
        !           896:       test -z "$ac_dir" && ac_dir=.
        !           897:       if test -f $ac_dir/nm; then
        !           898:         # Check to see if the nm accepts a BSD-compat flag.
        !           899:         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
        !           900:         #   nm: unknown option "B" ignored
        !           901:         if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
        !           902:           NM="$ac_dir/nm -B"
        !           903:         elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
        !           904:           NM="$ac_dir/nm -p"
        !           905:        else
        !           906:           NM="$ac_dir/nm"
        !           907:        fi
        !           908:         break
        !           909:       fi
        !           910:     done
        !           911:     IFS="$ac_save_ifs"
        !           912:     test -z "$NM" && NM=nm
        !           913:     ;;
        !           914:   esac
        !           915:   echo "$ac_t$NM" 1>&6
        !           916: fi
        !           917: 
        !           918: # Check for command to grab the raw symbol name followed by C symbol from nm.
        !           919: echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
        !           920: 
        !           921: # These are sane defaults that work on at least a few old systems.
        !           922: # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
        !           923: 
        !           924: # Character class describing NM global symbol codes.
        !           925: symcode='[BCDEGRSTU]'
        !           926: 
        !           927: # Regexp to match symbols that can be accessed directly from C.
        !           928: sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
        !           929: 
        !           930: # Transform the above into a raw symbol and a C symbol.
        !           931: symxfrm='\1 \1'
        !           932: 
        !           933: # Define system-specific variables.
        !           934: case "$host_os" in
        !           935: aix*)
        !           936:   symcode='[BCDTU]'
        !           937:   ;;
        !           938: irix*)
        !           939:   # Cannot use undefined symbols on IRIX because inlined functions mess us up.
        !           940:   symcode='[BCDEGRST]'
        !           941:   ;;
        !           942: solaris2*)
        !           943:   symcode='[BDTU]'
        !           944:   ;;
        !           945: esac
        !           946: 
        !           947: # If we're using GNU nm, then use its standard symbol codes.
        !           948: if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
        !           949:   symcode='[ABCDGISTUW]'
        !           950: fi
        !           951: 
        !           952: # Write the raw and C identifiers.
        !           953: global_symbol_pipe="sed -n -e 's/^.* $symcode $sympat$/$symxfrm/p'"
        !           954: 
        !           955: # Check to see that the pipe works correctly.
        !           956: pipe_works=no
        !           957: $rm conftest*
        !           958: cat > conftest.c <<EOF
        !           959: #ifdef __cplusplus
        !           960: extern "C" {
        !           961: #endif
        !           962: char nm_test_var;
        !           963: void nm_test_func(){}
        !           964: #ifdef __cplusplus
        !           965: }
        !           966: #endif
        !           967: main(){nm_test_var='a';nm_test_func();return(0);}
        !           968: EOF
        !           969: 
        !           970: echo "$progname:970: checking if global_symbol_pipe works" >&5
        !           971: if { (eval echo $progname:971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then
        !           972:   # Now try to grab the symbols.
        !           973:   nlist=conftest.nm
        !           974:   if { echo "$progname:974: eval \"$NM conftest.o | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.o | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
        !           975: 
        !           976:     # Try sorting and uniquifying the output.
        !           977:     if sort "$nlist" | uniq > "$nlist"T; then
        !           978:       mv -f "$nlist"T "$nlist"
        !           979:       wcout=`wc "$nlist" 2>/dev/null`
        !           980:       count=`$echo "X$wcout" | $Xsed -e 's/^[  ]*\([0-9][0-9]*\).*$/\1/'`
        !           981:       (test "$count" -ge 0) 2>/dev/null || count=-1
        !           982:     else
        !           983:       rm -f "$nlist"T
        !           984:       count=-1
        !           985:     fi
        !           986: 
        !           987:     # Make sure that we snagged all the symbols we need.
        !           988:     if egrep ' nm_test_var$' "$nlist" >/dev/null; then
        !           989:       if egrep ' nm_test_func$' "$nlist" >/dev/null; then
        !           990:        cat <<EOF > conftest.c
        !           991: #ifdef __cplusplus
        !           992: extern "C" {
        !           993: #endif
        !           994: 
        !           995: EOF
        !           996:         # Now generate the symbol file.
        !           997:         sed 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> conftest.c
        !           998: 
        !           999:        cat <<EOF >> conftest.c
        !          1000: #if defined (__STDC__) && __STDC__
        !          1001: # define __ptr_t void *
        !          1002: #else
        !          1003: # define __ptr_t char *
        !          1004: #endif
        !          1005: 
        !          1006: /* The number of symbols in dld_preloaded_symbols, -1 if unsorted. */
        !          1007: int dld_preloaded_symbol_count = $count;
        !          1008: 
        !          1009: /* The mapping between symbol names and symbols. */
        !          1010: struct {
        !          1011:   char *name;
        !          1012:   __ptr_t address;
        !          1013: }
        !          1014: dld_preloaded_symbols[] =
        !          1015: {
        !          1016: EOF
        !          1017:         sed 's/^\(.*\) \(.*\)$/  {"\1", (__ptr_t) \&\2},/' < "$nlist" >> conftest.c
        !          1018:         cat <<\EOF >> conftest.c
        !          1019:   {0, (__ptr_t) 0}
        !          1020: };
        !          1021: 
        !          1022: #ifdef __cplusplus
        !          1023: }
        !          1024: #endif
        !          1025: EOF
        !          1026:         # Now try linking the two files.
        !          1027:         mv conftest.o conftestm.o
        !          1028:        save_LIBS="$LIBS"
        !          1029:        save_CFLAGS="$CFLAGS"
        !          1030:         LIBS='conftestm.o'
        !          1031:        CFLAGS="$CFLAGS$no_builtin_flag"
        !          1032:         if { (eval echo $progname:1032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
        !          1033:           pipe_works=yes
        !          1034:         else
        !          1035:           echo "$progname: failed program was:" >&5
        !          1036:           cat conftest.c >&5
        !          1037:         fi
        !          1038:         LIBS="$save_LIBS"
        !          1039:       else
        !          1040:         echo "cannot find nm_test_func in $nlist" >&5
        !          1041:       fi
        !          1042:     else
        !          1043:       echo "cannot find nm_test_var in $nlist" >&5
        !          1044:     fi
        !          1045:   else
        !          1046:     echo "cannot run $global_symbol_pipe" >&5
        !          1047:   fi
        !          1048: else
        !          1049:   echo "$progname: failed program was:" >&5
        !          1050:   cat conftest.c >&5
        !          1051: fi
        !          1052: $rm conftest*
        !          1053: 
        !          1054: # Do not use the global_symbol_pipe unless it works.
        !          1055: echo "$ac_t$pipe_works" 1>&6
        !          1056: test "$pipe_works" = yes || global_symbol_pipe=
1.1       frystyk  1057: 
                   1058: # Check hardcoding attributes.
                   1059: echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
                   1060: hardcode_action=
                   1061: if test -n "$hardcode_libdir_flag_spec" || \
1.2     ! frystyk  1062:    test -n "$runpath_var"; then
1.1       frystyk  1063: 
                   1064:   # We can hardcode non-existant directories.
                   1065:   if test "$hardcode_direct" != no && \
                   1066:      test "$hardcode_minus_L" != no && \
                   1067:      test "$hardcode_shlibpath_var" != no; then
                   1068: 
                   1069:     # Linking always hardcodes the temporary library directory.
                   1070:     hardcode_action=relink
                   1071:   else
                   1072:     # We can link without hardcoding, and we can hardcode nonexisting dirs.
                   1073:     hardcode_action=immediate
                   1074:   fi
                   1075: elif test "$hardcode_direct" != yes && \
                   1076:      test "$hardcode_minus_L" != yes && \
                   1077:      test "$hardcode_shlibpath_var" != yes; then
1.2     ! frystyk  1078:   # We cannot hardcode anything.
1.1       frystyk  1079:   hardcode_action=unsupported
                   1080: else
                   1081:   # We can only hardcode existing directories.
                   1082:   hardcode_action=relink
                   1083: fi
1.2     ! frystyk  1084: echo "$ac_t$hardcode_action" 1>&6
1.1       frystyk  1085: test "$hardcode_action" = unsupported && can_build_shared=no
                   1086: 
                   1087: 
                   1088: reload_flag=
                   1089: reload_cmds='$LD$reload_flag -o $output$reload_objs'
                   1090: echo $ac_n "checking for $LD option to reload object files... $ac_c" 1>&6
                   1091: # PORTME Some linker may need a different reload flag.
                   1092: reload_flag='-r'
1.2     ! frystyk  1093: echo "$ac_t$reload_flag"
1.1       frystyk  1094: test -n "$reload_flag" && reload_flag=" $reload_flag"
                   1095: 
                   1096: # PORTME Fill in your ld.so characteristics
                   1097: library_names_spec=
1.2     ! frystyk  1098: libname_spec='lib$name'
1.1       frystyk  1099: soname_spec=
                   1100: postinstall_cmds=
1.2     ! frystyk  1101: postuninstall_cmds=
1.1       frystyk  1102: finish_cmds=
1.2     ! frystyk  1103: finish_eval=
1.1       frystyk  1104: shlibpath_var=
                   1105: version_type=none
                   1106: dynamic_linker="$host_os ld.so"
                   1107: 
                   1108: echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
                   1109: case "$host_os" in
                   1110: aix3* | aix4*)
                   1111:   version_type=linux
1.2     ! frystyk  1112:   library_names_spec='${libname}${release}.so.$versuffix $libname.a'
1.1       frystyk  1113:   shlibpath_var=LIBPATH
                   1114: 
                   1115:   # AIX has no versioning support, so we append a major version to the name.
1.2     ! frystyk  1116:   soname_spec='${libname}${release}.so.$major'
        !          1117:   ;;
        !          1118: 
        !          1119: amigaos*)
        !          1120:   library_names_spec='$libname.ixlibrary $libname.a'
        !          1121:   # Create ${libname}_ixlibrary.a entries in /sys/libs.
        !          1122:   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'
1.1       frystyk  1123:   ;;
                   1124: 
                   1125: freebsd2* | freebsd3*)
                   1126:   version_type=sunos
1.2     ! frystyk  1127:   library_names_spec='${libname}${release}.so.$versuffix $libname.so'
        !          1128:   finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
1.1       frystyk  1129:   shlibpath_var=LD_LIBRARY_PATH
                   1130:   ;;
                   1131: 
                   1132: gnu*)
                   1133:   version_type=sunos
1.2     ! frystyk  1134:   library_names_spec='${libname}${release}.so.$versuffix'
1.1       frystyk  1135:   shlibpath_var=LD_LIBRARY_PATH
                   1136:   ;;
                   1137: 
                   1138: hpux9* | hpux10*)
                   1139:   # Give a soname corresponding to the major version so that dld.sl refuses to
                   1140:   # link against other versions.
                   1141:   dynamic_linker="$host_os dld.sl"
                   1142:   version_type=sunos
                   1143:   shlibpath_var=SHLIB_PATH
1.2     ! frystyk  1144:   library_names_spec='${libname}${release}.sl.$versuffix ${libname}${release}.sl.$major $libname.sl'
        !          1145:   soname_spec='${libname}${release}.sl.$major'
1.1       frystyk  1146:   # HP-UX runs *really* slowly unless shared libraries are mode 555.
                   1147:   postinstall_cmds='chmod 555 $lib'
                   1148:   ;;
                   1149: 
                   1150: irix5* | irix6*)
                   1151:   version_type=osf
1.2     ! frystyk  1152:   soname_spec='${libname}${release}.so'
        !          1153:   library_names_spec='${libname}${release}.so.$versuffix $libname.so'
1.1       frystyk  1154:   shlibpath_var=LD_LIBRARY_PATH
                   1155:   ;;
                   1156: 
                   1157: # No shared lib support for Linux oldld, aout, or coff.
                   1158: linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
                   1159:   dynamic_linker=no
                   1160:   ;;
                   1161: 
                   1162: # This must be Linux ELF.
                   1163: linux-gnu*)
                   1164:   version_type=linux
1.2     ! frystyk  1165:   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
        !          1166:   soname_spec='${libname}${release}.so.$major'
        !          1167:   finish_cmds='PATH="$PATH:/sbin" ldconfig -n $libdir'
1.1       frystyk  1168:   shlibpath_var=LD_LIBRARY_PATH
                   1169: 
                   1170:   if test -f /lib/ld.so.1; then
                   1171:     dynamic_linker='GNU ld.so'
                   1172:   else
                   1173:     # Only the GNU ld.so supports shared libraries on MkLinux.
                   1174:     case "$host_cpu" in
                   1175:     powerpc*) dynamic_linker=no ;;
                   1176:     *) dynamic_linker='Linux ld.so' ;;
                   1177:     esac
                   1178:   fi
                   1179:   ;;
                   1180: 
                   1181: netbsd* | openbsd*)
                   1182:   version_type=sunos
1.2     ! frystyk  1183:   library_names_spec='${libname}${release}.so.$versuffix'
        !          1184:   finish_cmds='PATH="$PATH:/sbin" ldconfig -m $libdir'
1.1       frystyk  1185:   shlibpath_var=LD_LIBRARY_PATH
                   1186:   ;;
                   1187: 
1.2     ! frystyk  1188: os2*)
        !          1189:   libname_spec='$name'
        !          1190:   library_names_spec='$libname.dll $libname.a'
        !          1191:   dynamic_linker='OS/2 ld.exe'
        !          1192:   shlibpath_var=LIBPATH
        !          1193:   ;;
        !          1194: 
1.1       frystyk  1195: osf3* | osf4*)
                   1196:   version_type=osf
1.2     ! frystyk  1197:   soname_spec='${libname}${release}.so'
        !          1198:   library_names_spec='${libname}${release}.so.$versuffix $libname.so'
1.1       frystyk  1199:   shlibpath_var=LD_LIBRARY_PATH
                   1200:   ;;
                   1201: 
                   1202: sco3.2v5*)
                   1203:   version_type=osf
1.2     ! frystyk  1204:   soname_spec='${libname}${release}.so.$major'
        !          1205:   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
1.1       frystyk  1206:   shlibpath_var=LD_LIBRARY_PATH
                   1207:   ;;
                   1208: 
                   1209: solaris2*)
                   1210:   version_type=linux
1.2     ! frystyk  1211:   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
        !          1212:   soname_spec='${libname}${release}.so.$major'
1.1       frystyk  1213:   shlibpath_var=LD_LIBRARY_PATH
                   1214:   ;;
                   1215: 
                   1216: sunos4*)
                   1217:   version_type=sunos
1.2     ! frystyk  1218:   library_names_spec='${libname}${release}.so.$versuffix'
        !          1219:   finish_cmds='PATH="$PATH:/usr/etc" ldconfig $libdir'
        !          1220:   shlibpath_var=LD_LIBRARY_PATH
        !          1221:   ;;
        !          1222: 
        !          1223: sysv4.2uw2*)
        !          1224:   version_type=linux
        !          1225:   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
        !          1226:   soname_spec='${libname}${release}.so.$major'
        !          1227:   shlibpath_var=LD_LIBRARY_PATH
        !          1228:   ;;
        !          1229: 
        !          1230: uts4*)
        !          1231:   version_type=linux
        !          1232:   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major $libname.so'
        !          1233:   soname_spec='${libname}${release}.so.$major'
1.1       frystyk  1234:   shlibpath_var=LD_LIBRARY_PATH
                   1235:   ;;
                   1236: 
                   1237: *)
                   1238:   dynamic_linker=no
                   1239:   ;;
                   1240: esac
1.2     ! frystyk  1241: echo "$ac_t$dynamic_linker"
1.1       frystyk  1242: test "$dynamic_linker" = no && can_build_shared=no
                   1243: 
1.2     ! frystyk  1244: # Report the final consequences.
1.1       frystyk  1245: echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
                   1246: 
                   1247: echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
                   1248: test "$can_build_shared" = "no" && enable_shared=no
                   1249: 
1.2     ! frystyk  1250: # On AIX, shared libraries and static libraries use the same namespace, and
        !          1251: # are all built from PIC.
1.1       frystyk  1252: case "$host_os" in
                   1253: aix*)
                   1254:   test "$enable_shared" = yes && enable_static=no
                   1255:   if test -n "$RANLIB"; then
                   1256:     archive_cmds="$archive_cmds;\$RANLIB \$lib"
                   1257:     postinstall_cmds='$RANLIB $lib'
                   1258:   fi
                   1259:   ;;
                   1260: esac
                   1261: 
1.2     ! frystyk  1262: echo "$ac_t$enable_shared" 1>&6
1.1       frystyk  1263: 
                   1264: # Make sure either enable_shared or enable_static is yes.
                   1265: test "$enable_shared" = yes || enable_static=yes
                   1266: 
                   1267: echo "checking whether to build static libraries... $enable_static" 1>&6
                   1268: 
1.2     ! frystyk  1269: echo $ac_n "checking for objdir... $ac_c" 1>&6
        !          1270: rm -f .libs 2>/dev/null
        !          1271: mkdir .libs 2>/dev/null
        !          1272: if test -d .libs; then
        !          1273:   objdir=.libs
        !          1274: else
        !          1275:   # MS-DOS does not allow filenames that begin with a dot.
        !          1276:   objdir=_libs
        !          1277: fi
        !          1278: rmdir .libs 2>/dev/null
        !          1279: echo "$ac_t$objdir" 1>&6
        !          1280: 
        !          1281: # Copy echo and quote the copy, instead of the original, because it is
        !          1282: # used later.
        !          1283: ltecho="$echo"
        !          1284: 
        !          1285: # Now quote all the things that may contain metacharacters.
        !          1286: for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
        !          1287:   old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
        !          1288:   link_static_flag no_builtin_flag export_dynamic_flag_spec \
        !          1289:   libname_spec library_names_spec soname_spec RANLIB \
        !          1290:   old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
        !          1291:   old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
        !          1292:   allow_undefined_flag no_undefined_flag \
        !          1293:   finish_cmds finish_eval global_symbol_pipe \
        !          1294:   hardcode_libdir_flag_spec hardcode_libdir_separator; do
        !          1295: 
        !          1296:   case "$var" in
        !          1297:   reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
        !          1298:   old_postinstall_cmds | old_postuninstall_cmds | archive_cmds | \
        !          1299:   postinstall_cmds | postuninstall_cmds | finish_cmds)
        !          1300:     # Double-quote double-evaled strings.
        !          1301:     eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\"\`"
        !          1302:     ;;
        !          1303:   *)
        !          1304:     eval "$var=\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`"
        !          1305:     ;;
        !          1306:   esac
        !          1307: done
        !          1308: 
1.1       frystyk  1309: ofile=libtool
                   1310: trap "$rm $ofile; exit 1" 1 2 15
                   1311: echo creating $ofile
1.2     ! frystyk  1312: $rm $ofile
1.1       frystyk  1313: cat <<EOF > $ofile
                   1314: #! /bin/sh
                   1315: 
                   1316: # libtool - Provide generalized library-building support services.
1.2     ! frystyk  1317: # Generated automatically by $PROGRAM - GNU $PACKAGE $VERSION
        !          1318: # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
        !          1319: #
        !          1320: # Copyright (C) 1996-1998 Free Software Foundation, Inc.
        !          1321: # Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
        !          1322: #
        !          1323: # This program is free software; you can redistribute it and/or modify
        !          1324: # it under the terms of the GNU General Public License as published by
        !          1325: # the Free Software Foundation; either version 2 of the License, or
        !          1326: # (at your option) any later version.
1.1       frystyk  1327: #
1.2     ! frystyk  1328: # This program is distributed in the hope that it will be useful, but
        !          1329: # WITHOUT ANY WARRANTY; without even the implied warranty of
        !          1330: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        !          1331: # General Public License for more details.
        !          1332: #
        !          1333: # You should have received a copy of the GNU General Public License
        !          1334: # along with this program; if not, write to the Free Software
        !          1335: # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
        !          1336: #
        !          1337: # As a special exception to the GNU General Public License, if you
        !          1338: # distribute this file as part of a program that contains a
        !          1339: # configuration script generated by Autoconf, you may include it under
        !          1340: # the same distribution terms that you use for the rest of that program.
        !          1341: 
1.1       frystyk  1342: # This program was configured as follows,
                   1343: # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
                   1344: #
                   1345: # CC="$old_CC" CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" \\
1.2     ! frystyk  1346: # LD="$old_LD" NM="$old_NM" RANLIB="$old_RANLIB" LN_S="$old_LN_S" \\
1.1       frystyk  1347: #   $0$ltconfig_args
                   1348: #
                   1349: # Compiler and other test output produced by $progname, useful for
                   1350: # debugging $progname, is in ./config.log if it exists.
                   1351: 
1.2     ! frystyk  1352: # Sed that helps us avoid accidentally triggering echo(1) options like -n.
        !          1353: Xsed="sed -e s/^X//"
        !          1354: 
        !          1355: # The HP-UX ksh and POSIX shell print the target directory to stdout
        !          1356: # if CDPATH is set.
        !          1357: if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
        !          1358: 
        !          1359: # An echo program that does not interpret backslashes.
        !          1360: echo="$ltecho"
        !          1361: 
1.1       frystyk  1362: # The version of $progname that generated this script.
                   1363: LTCONFIG_VERSION="$VERSION"
                   1364: 
1.2     ! frystyk  1365: # Shell to use when invoking shell scripts.
        !          1366: SHELL=${CONFIG_SHELL-/bin/sh}
        !          1367: 
1.1       frystyk  1368: # Whether or not to build libtool libraries.
                   1369: build_libtool_libs=$enable_shared
                   1370: 
                   1371: # Whether or not to build old-style libraries.
                   1372: build_old_libs=$enable_static
                   1373: 
                   1374: # The host system.
                   1375: host_alias="$host_alias"
                   1376: host="$host"
                   1377: 
                   1378: # The archiver.
1.2     ! frystyk  1379: AR="$AR"
        !          1380: 
        !          1381: # The default C compiler.
        !          1382: CC="$CC"
1.1       frystyk  1383: 
                   1384: # The linker used to build libraries.
1.2     ! frystyk  1385: LD="$LD"
1.1       frystyk  1386: 
                   1387: # Whether we need hard or soft links.
1.2     ! frystyk  1388: LN_S="$LN_S"
        !          1389: 
        !          1390: # A BSD-compatible nm program.
        !          1391: NM="$NM"
        !          1392: 
        !          1393: # The name of the directory that contains temporary libtool files.
        !          1394: objdir="$objdir"
1.1       frystyk  1395: 
                   1396: # How to create reloadable object files.
1.2     ! frystyk  1397: reload_flag="$reload_flag"
        !          1398: reload_cmds="$reload_cmds"
1.1       frystyk  1399: 
                   1400: # How to pass a linker flag through the compiler.
1.2     ! frystyk  1401: wl="$wl"
1.1       frystyk  1402: 
                   1403: # Additional compiler flags for building library objects.
1.2     ! frystyk  1404: pic_flag="$pic_flag"
1.1       frystyk  1405: 
                   1406: # Compiler flag to prevent dynamic linking.
1.2     ! frystyk  1407: link_static_flag="$link_static_flag"
        !          1408: 
        !          1409: # Compiler flag to turn off builtin functions.
        !          1410: no_builtin_flag="$no_builtin_flag"
1.1       frystyk  1411: 
                   1412: # Compiler flag to allow reflexive dlopens.
1.2     ! frystyk  1413: export_dynamic_flag_spec="$export_dynamic_flag_spec"
1.1       frystyk  1414: 
                   1415: # Library versioning type.
                   1416: version_type=$version_type
                   1417: 
1.2     ! frystyk  1418: # Format of library name prefix.
        !          1419: libname_spec="$libname_spec"
        !          1420: 
1.1       frystyk  1421: # List of archive names.  First name is the real one, the rest are links.
                   1422: # The last name is the one that the linker finds with -lNAME.
1.2     ! frystyk  1423: library_names_spec="$library_names_spec"
1.1       frystyk  1424: 
                   1425: # The coded name of the library, if different from the real name.
1.2     ! frystyk  1426: soname_spec="$soname_spec"
1.1       frystyk  1427: 
                   1428: # Commands used to build and install an old-style archive.
1.2     ! frystyk  1429: RANLIB="$RANLIB"
        !          1430: old_archive_cmds="$old_archive_cmds"
        !          1431: old_postinstall_cmds="$old_postinstall_cmds"
        !          1432: old_postuninstall_cmds="$old_postuninstall_cmds"
        !          1433: 
        !          1434: # Create an old-style archive from a shared archive.
        !          1435: old_archive_from_new_cmds="$old_archive_from_new_cmds"
1.1       frystyk  1436: 
                   1437: # Commands used to build and install a shared archive.
1.2     ! frystyk  1438: archive_cmds="$archive_cmds"
        !          1439: postinstall_cmds="$postinstall_cmds"
        !          1440: postuninstall_cmds="$postuninstall_cmds"
1.1       frystyk  1441: 
                   1442: # Flag that allows shared libraries with undefined symbols to be built.
1.2     ! frystyk  1443: allow_undefined_flag="$allow_undefined_flag"
        !          1444: 
        !          1445: # Flag that forces no undefined symbols.
        !          1446: no_undefined_flag="$no_undefined_flag"
1.1       frystyk  1447: 
                   1448: # Commands used to finish a libtool library installation in a directory.
1.2     ! frystyk  1449: finish_cmds="$finish_cmds"
        !          1450: 
        !          1451: # Same as above, but a single script fragment to be evaled but not shown.
        !          1452: finish_eval="$finish_eval"
1.1       frystyk  1453: 
1.2     ! frystyk  1454: # Take the output of nm and produce a listing of raw symbols and C names.
        !          1455: global_symbol_pipe="$global_symbol_pipe"
1.1       frystyk  1456: 
                   1457: # This is the shared library runtime path variable.
                   1458: runpath_var=$runpath_var
                   1459: 
                   1460: # This is the shared library path variable.
                   1461: shlibpath_var=$shlibpath_var
                   1462: 
                   1463: # How to hardcode a shared library path into an executable.
                   1464: hardcode_action=$hardcode_action
                   1465: 
                   1466: # Flag to hardcode \$libdir into a binary during linking.
                   1467: # This must work even if \$libdir does not exist.
1.2     ! frystyk  1468: hardcode_libdir_flag_spec="$hardcode_libdir_flag_spec"
1.1       frystyk  1469: 
                   1470: # Whether we need a single -rpath flag with a separated argument.
1.2     ! frystyk  1471: hardcode_libdir_separator="$hardcode_libdir_separator"
1.1       frystyk  1472: 
                   1473: # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
                   1474: # resulting binary.
                   1475: hardcode_direct=$hardcode_direct
                   1476: 
                   1477: # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
                   1478: # resulting binary.
                   1479: hardcode_minus_L=$hardcode_minus_L
                   1480: 
                   1481: # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
                   1482: # the resulting binary.
                   1483: hardcode_shlibpath_var=$hardcode_shlibpath_var
                   1484: 
                   1485: EOF
                   1486: 
1.2     ! frystyk  1487: case "$host_os" in
        !          1488: aix3*)
        !          1489:   cat <<\EOF >> $ofile
        !          1490: # AIX sometimes has problems with the GCC collect2 program.  For some
        !          1491: # reason, if we set the COLLECT_NAMES environment variable, the problems
        !          1492: # vanish in a puff of smoke.
        !          1493: if test "${COLLECT_NAMES+set}" != set; then
        !          1494:   COLLECT_NAMES=
        !          1495:   export COLLECT_NAMES
        !          1496: fi
        !          1497: 
        !          1498: EOF
1.1       frystyk  1499:   ;;
                   1500: esac
                   1501: 
1.2     ! frystyk  1502: # Append the ltmain.sh script.
        !          1503: cat "$ltmain" >> $ofile || (rm -f $ofile; exit 1)
1.1       frystyk  1504: 
                   1505: chmod +x $ofile
                   1506: exit 0
                   1507: 
                   1508: # Local Variables:
                   1509: # mode:shell-script
                   1510: # sh-indentation:2
                   1511: # End:

Webmaster