*** openldap-2.0.21/build/config.guess	Thu Apr  5 16:12:53 2001
--- openldap-2.0.21/build/config.guess	Thu Apr  5 16:18:17 2001
***************
*** 431,436 ****
--- 431,449 ----
  	fi
  	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  	exit 0 ;;
+     *:AIX:*:5)
+ 	case "`lsattr -El proc0 -a type -F value`" in
+ 		PowerPC*) IBM_ARCH=powerpc
+ 			IBM_CPU=ibm ;;
+ 		Itanium) IBM_ARCH=ia64 
+ 			IBM_CPU=intel ;;
+ 		POWER*)	IBM_ARCH=power
+ 			IBM_CPU=ibm ;;
+ 		*)	IBM_ARCH=powerpc
+ 			IBM_CPU=ibm ;;
+ 	esac
+ 	echo ${IBM_ARCH}-${IBM_CPU}-aix${UNAME_VERSION}.${UNAME_RELEASE}
+ 	exit 0 ;;
      *:AIX:*:*)
  	echo rs6000-ibm-aix
  	exit 0 ;;
*** openldap-2.0.21/build/config.sub	Thu Apr  5 16:12:53 2001
--- openldap-2.0.21/build/config.sub	Thu Apr  5 16:19:15 2001
***************
*** 440,445 ****
--- 440,448 ----
  		basic_machine=hppa1.1-hp
  		os=-proelf
  		;;
+ 	ia64*)
+ 		basic_machine=ia64-intel
+ 		;;
  	i370-ibm* | ibm*)
  		basic_machine=i370-ibm
  		;;
*** openldap-2.0.21/build/ltconfig	Thu Apr  5 16:12:53 2001
--- openldap-2.0.21/build/ltconfig	Thu Apr  5 16:28:30 2001
***************
*** 170,177 ****
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.5+OpenLDAP
! TIMESTAMP=" (1.385.2.206 2000/10/02 14:18:00)"
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm="rm -f"
--- 169,176 ----
  # Constants:
  PROGRAM=ltconfig
  PACKAGE=libtool
! VERSION=1.3.5a+OpenLDAP
! TIMESTAMP=" (1.385.2.236 2000/10/30 23:25:09)"
  ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  rm="rm -f"
***************
*** 373,379 ****
  if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
--- 372,378 ----
  if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
  if test "X${LANG+set}"   = Xset; then LANG=C;   export LANG;   fi
  
! if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
    echo "loading cache $cache_file within ltconfig"
    . $cache_file
  fi
***************
*** 624,649 ****
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   ac_cv_exeext="no"
!   $rm conftest*
!   echo 'main () { return 0; }' > conftest.c
!   echo "$progname:629: checking for executable suffix" >& 5
!   if { (eval echo $progname:630: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!     # Append any warnings to the config.log.
!     cat conftest.err 1>&5
! 
!     for ac_file in conftest.*; do
!       case $ac_file in
!       *.c | *.err | *.$objext ) ;;
!       *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!       esac
!     done
!   else
!     cat conftest.err 1>&5
!     echo "$progname: failed program was:" >&5
!     cat conftest.c >&5
!   fi
!   $rm conftest*
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
--- 623,655 ----
  if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
!   case "$host_os" in
!   cygwin* | mingw* | os2*)
!     ac_cv_exeext=.exe
!     ;;
!   *)
!     ac_cv_exeext="no"
!     $rm conftest*
!     echo 'main () { return 0; }' > conftest.c
!     echo "$progname:634: checking for executable suffix" >& 5
!     if { (eval echo $progname:635: \"$ac_link\") 1>&5; (eval $ac_link) 2>conftest.err; }; then
!       # Append any warnings to the config.log.
!       cat conftest.err 1>&5
! 
!       for ac_file in conftest.*; do
!         case $ac_file in
!         *.c | *.err | *.$objext ) ;;
!         *) ac_cv_exeext=.`echo $ac_file | sed -e s/conftest.//` ;;
!         esac
!       done
!     else
!       cat conftest.err 1>&5
!       echo "$progname: failed program was:" >&5
!       cat conftest.c >&5
!     fi
!     $rm conftest*
!     ;;
!   esac
  fi
  if test "X$ac_cv_exeext" = Xno; then
    exeext=""
***************
*** 697,705 ****
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4*)
      # All AIX code is PIC.
!     link_static_flag='-bnso -bI:/lib/syscalls.exp'
      ;;
  
    hpux9* | hpux10* | hpux11*)
--- 703,717 ----
  else
    # PORTME Check for PIC flags for the system compiler.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # All AIX code is PIC.
!     if test "$host_cpu" = ia64; then
!       # AIX 5 now supports IA64 processor
!       wl='-Wl,'
!       link_static_flag='-Bstatic'
!     else
!       link_static_flag='-bnso -bI:/lib/syscalls.exp'
!     fi
      ;;
  
    hpux9* | hpux10* | hpux11*)
***************
*** 774,781 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:776: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
--- 786,793 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS $pic_flag -DPIC"
!   echo "$progname:788: checking if $compiler PIC flag $pic_flag works" >&5
!   if { (eval echo $progname:789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
      # Append any warnings to the config.log.
      cat conftest.err 1>&5
      
***************
*** 827,834 ****
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:829: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
--- 839,846 ----
  chmod -w .
  save_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -o out/conftest2.o"
! echo "$progname:841: checking if $compiler supports -c -o file.o" >&5
! if { (eval echo $progname:842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then
  
    # The compiler can only warn and ignore the option if not recognized
    # So say no if there are warnings
***************
*** 860,867 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:862: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 872,879 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -c -o conftest.lo"
!   echo "$progname:874: checking if $compiler supports -c -o file.lo" >&5
! if { (eval echo $progname:875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 912,919 ****
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:914: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
--- 924,931 ----
    echo "int some_variable = 0;" > conftest.c
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c"
!   echo "$progname:926: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
!   if { (eval echo $progname:927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then
  
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
***************
*** 956,963 ****
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:958: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
--- 968,975 ----
  echo 'main(){return(0);}' > conftest.c
  save_LDFLAGS="$LDFLAGS"
  LDFLAGS="$LDFLAGS $link_static_flag"
! echo "$progname:970: checking if $compiler static flag $link_static_flag works" >&5
! if { (eval echo $progname:971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    echo "$ac_t$link_static_flag" 1>&6
  else
    echo "$ac_t"none 1>&6
***************
*** 989,995 ****
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:991: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
--- 1001,1007 ----
    if test "$with_gcc" = yes; then
      # Check if gcc -print-prog-name=ld gives a path.
      echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6
!     echo "$progname:1003: checking for ld used by GCC" >&5
      ac_prog=`($CC -print-prog-name=ld) 2>&5`
      case "$ac_prog" in
      # Accept absolute paths.
***************
*** 1013,1022 ****
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1015: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1018: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
--- 1025,1034 ----
      esac
    elif test "$with_gnu_ld" = yes; then
      echo $ac_n "checking for GNU ld... $ac_c" 1>&6
!     echo "$progname:1027: checking for GNU ld" >&5
    else
      echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
!     echo "$progname:1030: checking for non-GNU ld" >&5
    fi
  
    if test -z "$LD"; then
***************
*** 1079,1089 ****
  hardcode_libdir_separator=
  hardcode_direct=no
  hardcode_minus_L=no
- hardcode_default_flag=
  hardcode_shlibpath_var=unsupported
  runpath_var=
- link_export=
- link_export_all=
  always_export_symbols=no
  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  # include_expsyms should be a list of space-separated symbols to be *always*
--- 1091,1098 ----
***************
*** 1119,1126 ****
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4*)
      # On AIX, the GNU linker is very broken
      ld_shlibs=no
      cat <<EOF 1>&2
  
--- 1128,1136 ----
  
    # See if GNU ld supports shared libraries.
    case "$host_os" in
!   aix3* | aix4* | aix5*)
      # On AIX, the GNU linker is very broken
+     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
      ld_shlibs=no
      cat <<EOF 1>&2
  
***************
*** 1198,1208 ****
  
    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-     else
-       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
-       # can we support soname and/or expsyms with a.out? -oliva
      fi
      ;;
  
--- 1208,1218 ----
  
    netbsd*)
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+       archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
+       wlarc=
+     else
        archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
        archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
      fi
      ;;
  
***************
*** 1269,1275 ****
    aix3*)
      allow_undefined_flag=unsupported
      always_export_symbols=yes
-     link_export=' -bE:$export_symbols'
      archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname'
      # Note: this linker hardcodes the directories in LIBPATH if there
      # are no directories specified by -L.
--- 1279,1284 ----
***************
*** 1281,1319 ****
      fi
      ;;
  
!   aix4*)
!     hardcode_libdir_flag_spec='${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
! 	 strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
! 	# We have reworked collect2
! 	hardcode_direct=yes
        else
! 	# We have old collect2
! 	hardcode_direct=unsupported
! 	# It fails to find uninstalled libraries when the uninstalled
! 	# path is not listed in the libpath.  Setting hardcode_minus_L
! 	# to unsupported forces relinking
! 	hardcode_minus_L=yes
! 	hardcode_libdir_flag_spec='-L$libdir'
! 	hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       shared_flag='${wl}-bM:SRE'
        hardcode_direct=yes
-       hardcode_minus_L=yes
-       hardcode_default_flag='${wl}-b nolibpath'
      fi
!     allow_undefined_flag=' ${wl}-berok'
!     archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
!     archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
!     link_export=' ${wl}-bE:$export_symbols'
!     link_export_all=' ${wl}-bexpall'
      always_export_symbols=yes
     ;;
  
    amigaos*)
--- 1290,1364 ----
      fi
      ;;
  
!   aix4* | aix5*)
      hardcode_libdir_separator=':'
      if test "$with_gcc" = yes; then
        collect2name=`${CC} -print-prog-name=collect2`
        if test -f "$collect2name" && \
!         strings "$collect2name" | grep resolve_lib_name >/dev/null
        then
!         # We have reworked collect2
!         hardcode_direct=yes
        else
!         # We have old collect2
!         hardcode_direct=unsupported
!         # It fails to find uninstalled libraries when the uninstalled
!         # path is not listed in the libpath.  Setting hardcode_minus_L
!         # to unsupported forces relinking
!         hardcode_minus_L=yes
!         hardcode_libdir_flag_spec='-L$libdir'
!         hardcode_libdir_separator=
        fi
        shared_flag='-shared'
      else
!       if test "$host_cpu" = ia64; then
!         shared_flag='-G'
!       else
!         shared_flag='${wl}-bM:SRE'
!       fi
        hardcode_direct=yes
      fi
! 
!     if test "$host_cpu" = ia64; then
!       # On IA64, the linker does run time linking by default, so we don't
!       # have to do anything special.
!       aix_use_runtimelinking=no
!       exp_sym_flag='-Bexport'
!     else
!       # Test if we are trying to use run time linking, or normal AIX style linking.
!       # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
!       aix_use_runtimelinking=no
!       for ld_flag in $LDFLAGS; do
!         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
!           aix_use_runtimelinking=yes
!           break
!         fi
!       done
!       exp_sym_flag='-bexport'
!     fi
!     # It seems that -bexpall can do strange things, so it is better to
!     # generate a list of symbols to export.
      always_export_symbols=yes
+     hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+     if test "$aix_use_runtimelinking" = yes; then
+       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+       allow_undefined_flag=' -Wl,-G'
+       archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${allow_undefined_flag} '"\${wl}-bnoentry \${wl}$exp_sym_flag:\$export_symbols"
+     else
+       if test "$host_cpu" = ia64; then
+         hardcode_libdir_flag_spec='${wl}-R$libdir:/usr/lib:/lib'
+         allow_undefined_flag="-znodefs"
+         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname ${wl}-h$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+       else
+         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+         # Warning - without using the other run time loading flags, -berok will
+         #           link without error, but may produce a broken library.
+         allow_undefined_flag="-berok"
+         # This is a bit strange, but is similar to how AIX traditionally builds
+         # it's shared libraries.
+         archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}${allow_undefined_flag}  '"\${wl}-bnoentry \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
+       fi
+     fi
     ;;
  
    amigaos*)
***************
*** 1452,1459 ****
      else
        allow_undefined_flag=' -expect_unresolved \*'
        archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
      fi
!     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
      hardcode_libdir_separator=:
      ;;
    rhapsody*)
--- 1486,1496 ----
      else
        allow_undefined_flag=' -expect_unresolved \*'
        archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+       $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'
      fi
! #Both c and cxx compiler support -rpath directly 
!     hardcode_libdir_flag_spec='-rpath $libdir'
      hardcode_libdir_separator=:
      ;;
    rhapsody*)
***************
*** 1582,1588 ****
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
--- 1619,1626 ----
  	# Check to see if the nm accepts a BSD-compat flag.
  	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
  	#   nm: unknown option "B" ignored
! 	# Tru64's nm complains that /dev/null is an invalid object file
! 	if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  	  NM="$ac_dir/nm -B"
  	  break
  	elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
***************
*** 1667,1677 ****
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1653: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1657: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
--- 1705,1715 ----
  main(){nm_test_var='a';nm_test_func();return(0);}
  EOF
  
!   echo "$progname:1709: checking if global_symbol_pipe works" >&5
!   if { (eval echo $progname:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
      # Now try to grab the symbols.
      nlist=conftest.nm
!     if { echo "$progname:1713: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
  
        # Try sorting and uniquifying the output.
        if sort "$nlist" | uniq > "$nlist"T; then
***************
*** 1723,1729 ****
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
--- 1761,1767 ----
  	  save_CFLAGS="$CFLAGS"
  	  LIBS="conftstm.$objext"
  	  CFLAGS="$CFLAGS$no_builtin_flag"
! 	  if { (eval echo $progname:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
  	    pipe_works=yes
  	  else
  	    echo "$progname: failed program was:" >&5
***************
*** 1833,1854 ****
  
    # AIX has no versioning support, so we append a major version to the name.
    soname_spec='${libname}${release}.so$major'
-   lt_cv_dlopen_self=yes
-   need_lib_prefix=no
    ;;
  
! aix4*)
    version_type=linux
!   # AIX has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
!   shlibpath_var=LIBPATH
!   deplibs_check_method=pass_all
!   lt_cv_dlopen_self=yes
!   need_lib_prefix=no
    ;;
  
  amigaos*)
--- 1871,1905 ----
  
    # AIX has no versioning support, so we append a major version to the name.
    soname_spec='${libname}${release}.so$major'
    ;;
  
! aix4* | aix5*)
    version_type=linux
!   if test "$host_cpu" = ia64; then
!     # AIX 5 supports IA64
!     library_names_spec='${libname}${release}.so$major  ${libname}${release}.so$versuffix ${libname}.so'
!     shlibpath_var=LD_LIBRARY_PATH
!     soname_spec='${libname}${release}.so$major'
!     deplibs_check_method=pass_all
!   else
!   # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
    # soname into executable. Probably we can add versioning support to
    # collect2, so additional links can be useful in future.
    # We preserve .a as extension for shared libraries though AIX4.2
    # and later linker supports .so
!     if test "$aix_use_runtimelinking" = yes; then
!       # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
!       # lib<name>.a to let people know that these are not typical AIX shared libraries.
!       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
!     else
!       # We preserve .a as extension for shared libraries though AIX4.2
!       # and later when we are not doing run time linking.
!       library_names_spec='${libname}${release}.a $libname.a'
!       soname_spec='${libname}${release}.so$major'
!     fi
!     shlibpath_var=LIBPATH
!     deplibs_check_method=pass_all
!   fi
    ;;
  
  amigaos*)
***************
*** 1927,1953 ****
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2* | freebsd3.[01]* | freebsdelf3.[01]*)
      shlibpath_overrides_runpath=yes
      ;;
!   *) # from 3.2 on
      shlibpath_overrides_runpath=no
      ;;
    esac
    ;;
  
- darwin* | rhapsody*)
-   deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-   file_magic_cmd=/usr/bin/file
-   file_magic_test_file=`echo System/Library/Frameworks/System.framework/Versions/*/System | head -1`
-   library_names_spec='${libname}.$(if [ "$module" = "yes" ]; then echo so; else echo dylib; fi)'
-   need_lib_prefix=no
-   need_version=no
-   postinstall_cmds='chmod +x $lib'
-   shlibpath_overrides_runpath=yes
-   shlibpath_var=DYLD_LIBRARY_PATH
-   ;;
- 
  gnu*)
    version_type=linux
    need_lib_prefix=no
--- 1978,1992 ----
    esac
    shlibpath_var=LD_LIBRARY_PATH
    case "$host_os" in
!   freebsd2*)
      shlibpath_overrides_runpath=yes
      ;;
!   *)
      shlibpath_overrides_runpath=no
      ;;
    esac
    ;;
  
  gnu*)
    version_type=linux
    need_lib_prefix=no
***************
*** 1984,1991 ****
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so.$major'
!   library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
--- 2023,2030 ----
    version_type=irix
    need_lib_prefix=no
    need_version=no
!   soname_spec='${libname}${release}.so$major'
!   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
    case "$host_os" in
    irix5*)
      libsuff= shlibsuff=
***************
*** 2027,2041 ****
    shlibpath_overrides_runpath=no
    deplibs_check_method=pass_all
  
!   if test -f /lib/ld.so.1; then
!     dynamic_linker='GNU ld.so'
!   else
!     # Only the GNU ld.so supports shared libraries on MkLinux.
!     case "$host_cpu" in
!     powerpc*) dynamic_linker=no ;;
!     *) dynamic_linker='Linux ld.so' ;;
!     esac
!   fi
    ;;
  
  netbsd*)
--- 2066,2078 ----
    shlibpath_overrides_runpath=no
    deplibs_check_method=pass_all
  
!   # We used to test for /lib/ld.so.1 and disable shared libraries on
!   # powerpc, because MkLinux only supported shared libraries with the
!   # GNU dynamic linker.  Since this was broken with cross compilers,
!   # most powerpc-linux boxes support dynamic linking these days and
!   # people can always --disable-shared, the test was removed, and we
!   # assume the GNU/Linux dynamic linker is in use.
!   dynamic_linker='GNU/Linux ld.so'
    ;;
  
  netbsd*)
***************
*** 2045,2050 ****
--- 2082,2090 ----
      finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
      dynamic_linker='NetBSD (a.out) ld.so'
    else
+     deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
+     file_magic_cmd=/usr/bin/file
+     file_magic_test_file=`echo /usr/lib/libc.so*`
      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
      soname_spec='${libname}${release}.so$major'
      dynamic_linker='NetBSD ld.elf_so'
***************
*** 2237,2243 ****
    fi
    ;;
  
! aix4*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
--- 2277,2283 ----
    fi
    ;;
  
! aix4* | aix5*)
    test "$enable_shared" = yes && enable_static=no
    ;;
  esac
***************
*** 2258,2263 ****
--- 2298,2308 ----
    enable_fast_install=needless
  fi
  
+ variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+ if test "$with_gcc" = yes; then
+   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+ fi
+ 
  echo $ac_n "checking for objdir... $ac_c" 1>&6
  rm -f .libs 2>/dev/null
  mkdir .libs 2>/dev/null
***************
*** 2278,2284 ****
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2248: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2323,2329 ----
  if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then
    lt_cv_dlopen=no lt_cv_dlopen_libs=
  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
! echo "$progname:2325: checking for dlopen in -ldl" >&5
  ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2286,2292 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2256 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
--- 2331,2337 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldl  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2333 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
***************
*** 2299,2305 ****
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2344,2350 ----
  dlopen()
  ; return 0; }
  EOF
! if { (eval echo $progname:2346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2318,2329 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2288: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2293 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
--- 2363,2374 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dlopen""... $ac_c" 1>&6
! echo "$progname:2365: checking for dlopen" >&5
  if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2370 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char dlopen(); below.  */
  #include <assert.h>
***************
*** 2348,2354 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
--- 2393,2399 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_dlopen=yes"
  else
***************
*** 2364,2371 ****
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2335: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2409,2455 ----
    lt_cv_dlopen="dlopen"
  else
    echo "$ac_t""no" 1>&6
+ echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+ echo "$progname:2412: checking for dlopen in -lsvld" >&5
+ if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lsvld  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 2419 "ltconfig"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ char dlopen();
+ 
+ int main() {
+ dlopen()
+ ; return 0; }
+ EOF
+ if { (eval echo $progname:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=yes
+ else
+   echo "$progname: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   ac_cv_lib_svld_dlopen=no
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
+   echo "$ac_t""yes" 1>&6
+   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ else
+   echo "$ac_t""no" 1>&6
  echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
! echo "$progname:2451: checking for dld_link in -ldld" >&5
  ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2373,2379 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2343 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
--- 2457,2463 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2459 "ltconfig"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
      builtin and then its argument prototype would still apply.  */
***************
*** 2386,2392 ****
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2470,2476 ----
  dld_link()
  ; return 0; }
  EOF
! if { (eval echo $progname:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2405,2416 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2375: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2380 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
--- 2489,2500 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load""... $ac_c" 1>&6
! echo "$progname:2491: checking for shl_load" >&5
  if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2496 "ltconfig"
  /* System header to define __stub macros and hopefully few prototypes,
      which can conflict with char shl_load(); below.  */
  #include <assert.h>
***************
*** 2435,2441 ****
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
--- 2519,2525 ----
  
  ; return 0; }
  EOF
! if { (eval echo $progname:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_shl_load=yes"
  else
***************
*** 2453,2459 ****
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2423: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
--- 2537,2543 ----
  else
    echo "$ac_t""no" 1>&6
  echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
! echo "$progname:2539: checking for shl_load in -ldld" >&5
  ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
***************
*** 2461,2467 ****
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2431 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
--- 2545,2551 ----
    ac_save_LIBS="$LIBS"
  LIBS="-ldld  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 2547 "ltconfig"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
  /* We use char because int might match the return type of a gcc2
***************
*** 2475,2481 ****
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
--- 2559,2565 ----
  shl_load()
  ; return 0; }
  EOF
! if { (eval echo $progname:2561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
***************
*** 2509,2516 ****
--- 2593,2604 ----
  
  fi
  
+ fi
+ 
    if test "x$lt_cv_dlopen" != xno; then
      enable_dlopen=yes
+   else
+     enable_dlopen=no
    fi
  
    case "$lt_cv_dlopen" in
***************
*** 2518,2534 ****
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2488: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2493 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
  ac_try="$ac_compile >/dev/null 2>conftest.out"
! { (eval echo $progname:2498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
--- 2606,2622 ----
  for ac_hdr in dlfcn.h; do
  ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "$progname:2608: checking for $ac_hdr" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 2613 "ltconfig"
  #include <$ac_hdr>
  int fnord = 0;
  EOF
  ac_try="$ac_compile >/dev/null 2>conftest.out"
! { (eval echo $progname:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
    rm -rf conftest*
***************
*** 2556,2562 ****
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2526: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2644,2650 ----
      LIBS="$lt_cv_dlopen_libs $LIBS"
  
    echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2646: checking whether a program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2564,2570 ****
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2534 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2652,2658 ----
      lt_cv_dlopen_self=cross
    else
      cat > conftest.c <<EOF
! #line 2654 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2610,2616 ****
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
--- 2698,2704 ----
  	       if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self=yes
  else
***************
*** 2629,2635 ****
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2599: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
--- 2717,2723 ----
    if test "$lt_cv_dlopen_self" = yes; then
      LDFLAGS="$LDFLAGS $link_static_flag"
    echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
! echo "$progname:2719: checking whether a statically linked program can dlopen itself" >&5
  if test "${lt_cv_dlopen_self_static+set}" = set; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
***************
*** 2637,2643 ****
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2607 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
--- 2725,2731 ----
      lt_cv_dlopen_self_static=cross
    else
      cat > conftest.c <<EOF
! #line 2727 "ltconfig"
  
  #if HAVE_DLFCN_H
  #include <dlfcn.h>
***************
*** 2683,2689 ****
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
--- 2771,2777 ----
      if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); } 
  
  EOF
! if { (eval echo $progname:2773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
  then
    lt_cv_dlopen_self_static=yes
  else
***************
*** 3026,3038 ****
  # resulting binary.
  hardcode_minus_L=$hardcode_minus_L
  
- # Flag to force default rpath, to bypass effect of -L
- hardcode_default_flag='$hardcode_default_flag'
- 
  # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  # the resulting binary.
  hardcode_shlibpath_var=$hardcode_shlibpath_var
  
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$sys_lib_search_path_spec
  
--- 3114,3127 ----
  # resulting binary.
  hardcode_minus_L=$hardcode_minus_L
  
  # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  # the resulting binary.
  hardcode_shlibpath_var=$hardcode_shlibpath_var
  
+ # Variables whose values should be saved in libtool wrapper scripts and
+ # restored at relink time.
+ variables_saved_for_relink="$variables_saved_for_relink"
+ 
  # Compile-time system search path for libraries
  sys_lib_search_path_spec=$sys_lib_search_path_spec
  
***************
*** 3044,3053 ****
  
  # Set to yes if exported symbols are required.
  always_export_symbols=$always_export_symbols
- 
- # Set to use export list when linking programs.
- link_export='$link_export'
- link_export_all='$link_export_all'
  
  # The commands to list exported symbols.
  export_symbols_cmds=$export_symbols_cmds
--- 3133,3138 ----
*** openldap-2.0.21/build/ltmain.sh	Thu Apr  5 16:12:53 2001
--- openldap-2.0.21/build/ltmain.sh	Thu Apr  5 16:33:17 2001
***************
*** 56,62 ****
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.5+OpenLDAP
  TIMESTAMP=" (1.385.2.206 2000/10/02 14:18:00)"
  
  default_mode=
--- 54,60 ----
  # Constants.
  PROGRAM=ltmain.sh
  PACKAGE=libtool
! VERSION=1.3.5a+OpenLDAP
  TIMESTAMP=" (1.385.2.206 2000/10/02 14:18:00)"
  
  default_mode=
***************
*** 402,408 ****
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
--- 400,406 ----
      # Calculate the filename of the output object if compiler does
      # not support -o with -c
      if test "$compiler_c_o" = no; then
!       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
        lockfile="$output_obj.lock"
        removelist="$removelist $output_obj $lockfile"
        trap "$run $rm $removelist; exit 1" 1 2 15
***************
*** 414,420 ****
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
--- 412,418 ----
      # Lock this critical section if it is needed
      # We use this script file to make the link, it avoids creating a new file
      if test "$need_locks" = yes; then
!       until $run ln "$0" "$lockfile" 2>/dev/null; do
  	$show "Waiting for $lockfile to be removed"
  	sleep 2
        done
***************
*** 624,630 ****
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $rm "$lockfile"
      fi
  
      exit 0
--- 622,628 ----
  
      # Unlock the critical section if it was locked
      if test "$need_locks" != no; then
!       $run $rm "$lockfile"
      fi
  
      exit 0
***************
*** 1087,1100 ****
        -l*)
  	if test "$arg" = "-lc"; then
  	  case "$host" in
! 	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | *-*-aix*)
  	    # These systems don't actually have c library (as such)
  	    continue
  	    ;;
-           *-*-rhapsody* | *-*-darwin*)
-             # Darwin C library is in the System framework
-             deplibs="$deplibs -framework System"
-             ;;
  	  esac
  	elif test "$arg" = "-lm"; then
  	  case "$host" in
--- 1085,1094 ----
        -l*)
  	if test "$arg" = "-lc"; then
  	  case "$host" in
! 	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  	    # These systems don't actually have c library (as such)
  	    continue
  	    ;;
  	  esac
  	elif test "$arg" = "-lm"; then
  	  case "$host" in
***************
*** 1102,1111 ****
  	    # These systems don't actually have math library (as such)
  	    continue
  	    ;;
-           *-*-rhapsody* | *-*-darwin*)
-             # Darwin math library is in the System framework
-             deplibs="$deplibs -framework System"
-             ;;
  	  esac
  	fi
  	deplibs="$deplibs $arg"
--- 1096,1101 ----
***************
*** 1156,1166 ****
  	;;
  
        -static)
! 	# If we have no pic_flag, then this is the same as -all-static.
! 	if test -z "$pic_flag" && test -n "$link_static_flag"; then
! 	  compile_command="$compile_command $link_static_flag"
! 	  finalize_command="$finalize_command $link_static_flag"
! 	fi
  	continue
  	;;
  
--- 1146,1156 ----
  	;;
  
        -static)
!         # The effects of -static are defined in a previous loop.
! 	# We used to do the same as -all-static on platforms that
! 	# didn't have a PIC flag, but the assumption that the effects
! 	# would be equivalent was wrong.  It would break on at least
! 	# Digital Unix and AIX.
  	continue
  	;;
  
***************
*** 1322,1327 ****
--- 1312,1320 ----
  	  # are required to link).
  	  if test -n "$old_library"; then
  	    dlprefiles="$dlprefiles $dir/$old_library"
+ 	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+ 	  elif test -n "$dlname"; then
+ 	    dlprefiles="$dlprefiles $dir/$dlname"
  	  else
  	    dlprefiles="$dlprefiles $dir/$linklib"
  	  fi
***************
*** 1638,1646 ****
  	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
        fi
        install_libdir="$2"
-       if test -n "$hardcode_default_flag"; then
- 	eval linkopts=\"$linkopts$hardcode_default_flag\"
-       fi
  
        oldlibs=
        if test -z "$rpath"; then
--- 1631,1636 ----
***************
*** 1720,1726 ****
  
  	irix)
  	  major=`expr $current - $age + 1`
- 	  versuffix="$major.$revision"
  	  verstring="sgi$major.$revision"
  
  	  # Add in all the interfaces that we are compatible with.
--- 1710,1715 ----
***************
*** 1730,1735 ****
--- 1719,1728 ----
  	    loop=`expr $loop - 1`
  	    verstring="sgi$major.$iface:$verstring"
  	  done
+ 
+ 	  # Before this point, $major must not contain `.'.
+ 	  major=.$major
+ 	  versuffix="$major.$revision"
  	  ;;
  
  	linux)
***************
*** 1815,1821 ****
  
  	dependency_libs="$deplibs"
  	case "$host" in
! 	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | *-*-aix*)
  	  # these systems don't actually have a c library (as such)!
  	  ;;
          *-*-rhapsody*)
--- 1808,1814 ----
  
  	dependency_libs="$deplibs"
  	case "$host" in
! 	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
  	  # these systems don't actually have a c library (as such)!
  	  ;;
          *-*-rhapsody*)
***************
*** 2476,2489 ****
        fi
        finalize_rpath="$rpath"
  
-       if test -z "$compile_rpath" -a -n "$hardcode_default_flag"; then
- 	eval compile_rpath=\" $hardcode_default_flag\"
-       fi
- 
-       if test -z "$finalize_rpath" -a -n "$hardcode_default_flag"; then
- 	eval finalize_rpath=\" $hardcode_default_flag\"
-       fi
- 
        output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
        if test "X$output_objdir" = "X$output"; then
  	output_objdir="$objdir"
--- 2469,2474 ----
***************
*** 2577,2608 ****
  	    fi
  	  fi
  
- 	# Prepare the list of exported symbols
- 	if test -z "$export_symbols"; then
- 	  if test "$always_export_symbols" = yes -a -n "$link_export_all"; then
- 	    eval link_export=\"$link_export_all\"
- 	  elif test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- 	    $show "generating symbol list for \`$output'"
- 	    export_symbols="$output_objdir/$output.exp"
- 	    $run $rm $export_symbols
- 	    libobjs="$objs"
- 	    eval cmds=\"$export_symbols_cmds\"
- 	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
- 	    for cmd in $cmds; do
- 	      IFS="$save_ifs"
- 	      $show "$cmd"
- 	      $run eval "$cmd" || exit $?
- 	    done
- 	    IFS="$save_ifs"
- 	    if test -n "$export_symbols_regex"; then
- 	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- 	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- 	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- 	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
- 	    fi
- 	  fi
- 	fi
- 
  	  for arg in $dlprefiles; do
  	    $show "extracting global C symbols from \`$arg'"
  	    name=`echo "$arg" | sed -e 's%^.*/%%'`
--- 2562,2567 ----
***************
*** 2680,2686 ****
  	  # linked before any other PIC object.  But we must not use
  	  # pic_flag when linking with -static.  The problem exists in
  	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
! 	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  	    case "$compile_command " in
  	    *" -static "*) ;;
  	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
--- 2639,2645 ----
  	  # linked before any other PIC object.  But we must not use
  	  # pic_flag when linking with -static.  The problem exists in
  	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
! 	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  	    case "$compile_command " in
  	    *" -static "*) ;;
  	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
***************
*** 2719,2733 ****
  	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
        fi
  
-       link_export_opt=
-       if test -n "$export_symbols" -o -n "$dlsyms"; then
- 	eval link_export_opt=\"$link_export\"
-       fi
- 
        if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
  	# Replace the output file specification.
  	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
! 	link_command="$compile_command$compile_rpath$link_export_opt"
  
  	# We have no uninstalled library dependencies, so finalize right now.
  	$show "$link_command"
--- 2678,2687 ----
  	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
        fi
  
        if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
  	# Replace the output file specification.
  	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
! 	link_command="$compile_command$compile_rpath"
  
  	# We have no uninstalled library dependencies, so finalize right now.
  	$show "$link_command"
***************
*** 2813,2821 ****
  
        # Replace the output file specification.
        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
! 
!       link_command="$link_command$link_export_opt"
! 
        # Delete the old output files.
        $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  
--- 2767,2773 ----
  
        # Replace the output file specification.
        link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
!       
        # Delete the old output files.
        $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  
***************
*** 2827,2832 ****
--- 2779,2796 ----
  
        # Quote the relink command for shipping.
        if test -n "$relink_command"; then
+ 	# Preserve any variables that may affect compiler behavior
+ 	for var in $variables_saved_for_relink; do
+ 	  if eval test -z \"\${$var+set}\"; then
+ 	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ 	  elif eval var_value=\$$var; test -z "$var_value"; then
+ 	    relink_command="$var=; export $var; $relink_command"
+ 	  else
+ 	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ 	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ 	  fi
+ 	done
+ 	relink_command="cd `pwd`; $relink_command"
  	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
        fi
  
***************
*** 3204,3210 ****
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
--- 3168,3176 ----
  
      # There may be an optional sh(1) argument at the beginning of
      # install_prog (especially on Windows NT).
!     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
!        # Allow the use of GNU shtool's install command.
!        $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
        # Aesthetically quote it.
        arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
        case "$arg" in
