Skip to content
Snippets Groups Projects
configure 593 KiB
Newer Older
  • Learn to ignore specific revisions
  • Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ac_exeext=$EXEEXT
    
    if test $host != $build; then
      ac_tool_prefix=${host_alias}-
    else
      ac_tool_prefix=
    fi
    
    
    
    
    # Check for command to grab the raw symbol name followed by C symbol from nm.
    echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
    
    echo "configure:4015: checking command to parse $NM output" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
    # These are sane defaults that work on at least a few old systems.
    # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
    
    # Character class describing NM global symbol codes.
    symcode='[BCDEGRST]'
    
    # Regexp to match symbols that can be accessed directly from C.
    sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
    
    # Transform the above into a raw symbol and a C symbol.
    symxfrm='\1 \2\3 \3'
    
    # Transform an extracted symbol line into a proper C declaration
    lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
    
    # Transform an extracted symbol line into symbol name and symbol address
    lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
    
    # Define system-specific variables.
    case $host_os in
    aix*)
      symcode='[BCDT]'
      ;;
    cygwin* | mingw* | pw32*)
      symcode='[ABCDGISTW]'
      ;;
    hpux*) # Its linker distinguishes data from code symbols
      lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
      lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
      ;;
    irix*)
      symcode='[BCDEGRST]'
      ;;
    solaris* | sysv5*)
      symcode='[BDT]'
      ;;
    sysv4)
      symcode='[DFNSTU]'
      ;;
    esac
    
    # Handle CRLF in mingw tool chain
    opt_cr=
    case $host_os in
    mingw*)
      opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
      ;;
    esac
    
    # If we're using GNU nm, then use its standard symbol codes.
    if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
      symcode='[ABCDGISTW]'
    fi
    
    # Try without a prefix undercore, then with it.
    for ac_symprfx in "" "_"; do
    
      # Write the raw and C identifiers.
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
    
      # Check to see that the pipe works correctly.
      pipe_works=no
      rm -f conftest*
      cat > conftest.$ac_ext <<EOF
    #ifdef __cplusplus
    extern "C" {
    #endif
    char nm_test_var;
    void nm_test_func(){}
    #ifdef __cplusplus
    }
    #endif
    int main(){nm_test_var='a';nm_test_func();return(0);}
    EOF
    
    
      if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        # Now try to grab the symbols.
        nlist=conftest.nm
    
        if { (eval echo configure:4098: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5; } && test -s "$nlist"; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
          # Try sorting and uniquifying the output.
          if sort "$nlist" | uniq > "$nlist"T; then
    	mv -f "$nlist"T "$nlist"
          else
    	rm -f "$nlist"T
          fi
    
          # Make sure that we snagged all the symbols we need.
          if egrep ' nm_test_var$' "$nlist" >/dev/null; then
    	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
    	  cat <<EOF > conftest.$ac_ext
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    EOF
    	  # Now generate the symbol file.
    	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
    
    	  cat <<EOF >> conftest.$ac_ext
    #if defined (__STDC__) && __STDC__
    # define lt_ptr void *
    #else
    # define lt_ptr char *
    # define const
    #endif
    
    /* The mapping between symbol names and symbols. */
    const struct {
      const char *name;
      lt_ptr address;
    }
    lt_preloaded_symbols[] =
    {
    EOF
    	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
    	  cat <<\EOF >> conftest.$ac_ext
      {0, (lt_ptr) 0}
    };
    
    #ifdef __cplusplus
    }
    #endif
    EOF
    	  # Now try linking the two files.
    	  mv conftest.$ac_objext conftstm.$ac_objext
    	  save_LIBS="$LIBS"
    	  save_CFLAGS="$CFLAGS"
    	  LIBS="conftstm.$ac_objext"
    	  CFLAGS="$CFLAGS$no_builtin_flag"
    
    	  if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    	    pipe_works=yes
    	  fi
    	  LIBS="$save_LIBS"
    	  CFLAGS="$save_CFLAGS"
    	else
    	  echo "cannot find nm_test_func in $nlist" >&5
    	fi
          else
    	echo "cannot find nm_test_var in $nlist" >&5
          fi
        else
          echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
        fi
      else
        echo "$progname: failed program was:" >&5
        cat conftest.$ac_ext >&5
      fi
      rm -f conftest* conftst*
    
      # Do not use the global_symbol_pipe unless it works.
      if test "$pipe_works" = yes; then
        break
      else
        lt_cv_sys_global_symbol_pipe=
      fi
    done
    
    fi
    
    global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
    if test -z "$lt_cv_sys_global_symbol_pipe"; then
      global_symbol_to_cdecl=
      global_symbol_to_c_name_address=
    else
      global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
      global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
    fi
    if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
    then
      echo "$ac_t""failed" 1>&6
    else
      echo "$ac_t""ok" 1>&6
    fi
    
    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 "configure:4198: checking for $ac_hdr" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #line 4203 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    #include <$ac_hdr>
    EOF
    ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
    
    { (eval echo configure:4208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
    if test -z "$ac_err"; then
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=yes"
    else
      echo "$ac_err" >&5
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      eval "ac_cv_header_$ac_safe=no"
    fi
    rm -f conftest*
    fi
    if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
      echo "$ac_t""yes" 1>&6
        ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
      cat >> confdefs.h <<EOF
    #define $ac_tr_hdr 1
    EOF
     
    else
      echo "$ac_t""no" 1>&6
    fi
    done
    
    
    
    
    
    # Only perform the check for file, if the check method requires it
    case $deplibs_check_method in
    file_magic*)
      if test "$file_magic_cmd" = '$MAGIC_CMD'; then
        echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
    
    echo "configure:4243: checking for ${ac_tool_prefix}file" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      case $MAGIC_CMD in
      /*)
      lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
      ;;
      ?:/*)
      lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
      ;;
      *)
      ac_save_MAGIC_CMD="$MAGIC_CMD"
      IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="/usr/bin:$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/${ac_tool_prefix}file; then
          lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
          if test -n "$file_magic_test_file"; then
    	case $deplibs_check_method in
    	"file_magic "*)
    	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
    	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
    	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
    	    egrep "$file_magic_regex" > /dev/null; then
    	    :
    	  else
    	    cat <<EOF 1>&2
    
    *** Warning: the command libtool uses to detect shared libraries,
    *** $file_magic_cmd, produces output that libtool cannot recognize.
    *** The result is that libtool may fail to recognize shared libraries
    *** as such.  This will affect the creation of libtool libraries that
    *** depend on shared libraries, but programs linked with such libtool
    *** libraries will work regardless of this problem.  Nevertheless, you
    *** may want to report the problem to your system manager and/or to
    *** bug-libtool@gnu.org
    
    EOF
    	  fi ;;
    	esac
          fi
          break
        fi
      done
      IFS="$ac_save_ifs"
      MAGIC_CMD="$ac_save_MAGIC_CMD"
      ;;
    esac
    fi
    
    MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
    if test -n "$MAGIC_CMD"; then
      echo "$ac_t""$MAGIC_CMD" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    if test -z "$lt_cv_path_MAGIC_CMD"; then
      if test -n "$ac_tool_prefix"; then
        echo $ac_n "checking for file""... $ac_c" 1>&6
    
    echo "configure:4305: checking for file" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      case $MAGIC_CMD in
      /*)
      lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
      ;;
      ?:/*)
      lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
      ;;
      *)
      ac_save_MAGIC_CMD="$MAGIC_CMD"
      IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="/usr/bin:$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/file; then
          lt_cv_path_MAGIC_CMD="$ac_dir/file"
          if test -n "$file_magic_test_file"; then
    	case $deplibs_check_method in
    	"file_magic "*)
    	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
    	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
    	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
    	    egrep "$file_magic_regex" > /dev/null; then
    	    :
    	  else
    	    cat <<EOF 1>&2
    
    *** Warning: the command libtool uses to detect shared libraries,
    *** $file_magic_cmd, produces output that libtool cannot recognize.
    *** The result is that libtool may fail to recognize shared libraries
    *** as such.  This will affect the creation of libtool libraries that
    *** depend on shared libraries, but programs linked with such libtool
    *** libraries will work regardless of this problem.  Nevertheless, you
    *** may want to report the problem to your system manager and/or to
    *** bug-libtool@gnu.org
    
    EOF
    	  fi ;;
    	esac
          fi
          break
        fi
      done
      IFS="$ac_save_ifs"
      MAGIC_CMD="$ac_save_MAGIC_CMD"
      ;;
    esac
    fi
    
    MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
    if test -n "$MAGIC_CMD"; then
      echo "$ac_t""$MAGIC_CMD" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
      else
        MAGIC_CMD=:
      fi
    fi
    
      fi
      ;;
    esac
    
    # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
    set dummy ${ac_tool_prefix}ranlib; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4376: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$RANLIB"; then
      ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    RANLIB="$ac_cv_prog_RANLIB"
    if test -n "$RANLIB"; then
      echo "$ac_t""$RANLIB" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$ac_cv_prog_RANLIB"; then
    if test -n "$ac_tool_prefix"; then
      # Extract the first word of "ranlib", so it can be a program name with args.
    set dummy ranlib; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4408: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$RANLIB"; then
      ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_RANLIB="ranlib"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
    fi
    fi
    RANLIB="$ac_cv_prog_RANLIB"
    if test -n "$RANLIB"; then
      echo "$ac_t""$RANLIB" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    else
      RANLIB=":"
    fi
    fi
    
    # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
    set dummy ${ac_tool_prefix}strip; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4443: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$STRIP"; then
      ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_STRIP="${ac_tool_prefix}strip"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    STRIP="$ac_cv_prog_STRIP"
    if test -n "$STRIP"; then
      echo "$ac_t""$STRIP" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$ac_cv_prog_STRIP"; then
    if test -n "$ac_tool_prefix"; then
      # Extract the first word of "strip", so it can be a program name with args.
    set dummy strip; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4475: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$STRIP"; then
      ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_STRIP="strip"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
    fi
    fi
    STRIP="$ac_cv_prog_STRIP"
    if test -n "$STRIP"; then
      echo "$ac_t""$STRIP" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    else
      STRIP=":"
    fi
    fi
    
    
    enable_dlopen=yes
    enable_win32_dll=yes
    
    # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
    if test "${enable_libtool_lock+set}" = set; then
      enableval="$enable_libtool_lock"
      :
    fi
    
    test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
    
    # Some flags need to be propagated to the compiler or linker for good
    # libtool support.
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    case $host in
    
    *-*-irix6*)
      # Find out which ABI we are using.
    
      echo '#line 4524 "configure"' > conftest.$ac_ext
      if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        case `/usr/bin/file conftest.$ac_objext` in
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
        *N32*)
          LD="${LD-ld} -n32"
          ;;
        *64-bit*)
          LD="${LD-ld} -64"
          ;;
        esac
      fi
      rm -rf conftest*
      ;;
    
    *-*-sco3.2v5*)
      # On SCO OpenServer 5, we need -belf to get full-featured binaries.
      SAVE_CFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS -belf"
      echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
    
    echo "configure:4546: checking whether the C compiler needs -belf" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      
         ac_ext=c
    # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    cross_compiling=$ac_cv_prog_cc_cross
    
         cat > conftest.$ac_ext <<EOF
    
    #line 4559 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    
    int main() {
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      lt_cv_cc_needs_belf=yes
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      lt_cv_cc_needs_belf=no
    fi
    rm -f conftest*
         ac_ext=c
    # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
    ac_cpp='$CPP $CPPFLAGS'
    ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
    ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
    cross_compiling=$ac_cv_prog_cc_cross
    
    fi
    
    echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
      if test x"$lt_cv_cc_needs_belf" != x"yes"; then
        # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
        CFLAGS="$SAVE_CFLAGS"
      fi
      ;;
    
    *-*-cygwin* | *-*-mingw* | *-*-pw32*)
      # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
    set dummy ${ac_tool_prefix}dlltool; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4596: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$DLLTOOL"; then
      ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    DLLTOOL="$ac_cv_prog_DLLTOOL"
    if test -n "$DLLTOOL"; then
      echo "$ac_t""$DLLTOOL" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$ac_cv_prog_DLLTOOL"; then
    if test -n "$ac_tool_prefix"; then
      # Extract the first word of "dlltool", so it can be a program name with args.
    set dummy dlltool; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4628: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$DLLTOOL"; then
      ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_DLLTOOL="dlltool"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
    fi
    fi
    DLLTOOL="$ac_cv_prog_DLLTOOL"
    if test -n "$DLLTOOL"; then
      echo "$ac_t""$DLLTOOL" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    else
      DLLTOOL="false"
    fi
    fi
    
      # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
    set dummy ${ac_tool_prefix}as; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4663: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$AS"; then
      ac_cv_prog_AS="$AS" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_AS="${ac_tool_prefix}as"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    AS="$ac_cv_prog_AS"
    if test -n "$AS"; then
      echo "$ac_t""$AS" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$ac_cv_prog_AS"; then
    if test -n "$ac_tool_prefix"; then
      # Extract the first word of "as", so it can be a program name with args.
    set dummy as; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4695: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$AS"; then
      ac_cv_prog_AS="$AS" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_AS="as"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
    fi
    fi
    AS="$ac_cv_prog_AS"
    if test -n "$AS"; then
      echo "$ac_t""$AS" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    else
      AS="false"
    fi
    fi
    
      # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
    set dummy ${ac_tool_prefix}objdump; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4730: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$OBJDUMP"; then
      ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
          break
        fi
      done
      IFS="$ac_save_ifs"
    fi
    fi
    OBJDUMP="$ac_cv_prog_OBJDUMP"
    if test -n "$OBJDUMP"; then
      echo "$ac_t""$OBJDUMP" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    
    if test -z "$ac_cv_prog_OBJDUMP"; then
    if test -n "$ac_tool_prefix"; then
      # Extract the first word of "objdump", so it can be a program name with args.
    set dummy objdump; ac_word=$2
    echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
    
    echo "configure:4762: checking for $ac_word" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      if test -n "$OBJDUMP"; then
      ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
    else
      IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
      ac_dummy="$PATH"
      for ac_dir in $ac_dummy; do
        test -z "$ac_dir" && ac_dir=.
        if test -f $ac_dir/$ac_word; then
          ac_cv_prog_OBJDUMP="objdump"
          break
        fi
      done
      IFS="$ac_save_ifs"
      test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
    fi
    fi
    OBJDUMP="$ac_cv_prog_OBJDUMP"
    if test -n "$OBJDUMP"; then
      echo "$ac_t""$OBJDUMP" 1>&6
    else
      echo "$ac_t""no" 1>&6
    fi
    
    else
      OBJDUMP="false"
    fi
    fi
    
    
      # recent cygwin and mingw systems supply a stub DllMain which the user
      # can override, but on older systems we have to supply one
      echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
    
    echo "configure:4798: checking if libtool should supply DllMain function" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #line 4803 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    
    int main() {
    extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
          DllMain (0, 0, 0);
    ; return 0; }
    EOF
    
    if { (eval echo configure:4811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      lt_cv_need_dllmain=no
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      lt_cv_need_dllmain=yes
    fi
    rm -f conftest*
    fi
    
    echo "$ac_t""$lt_cv_need_dllmain" 1>&6
    
      case $host/$CC in
      *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
        # old mingw systems require "-dll" to link a DLL, while more recent ones
        # require "-mdll"
        SAVE_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS -mdll"
        echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
    
    echo "configure:4832: checking how to link DLLs" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
      cat > conftest.$ac_ext <<EOF
    
    #line 4837 "configure"
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    #include "confdefs.h"
    
    int main() {
    
    ; return 0; }
    EOF
    
    if { (eval echo configure:4844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
      rm -rf conftest*
      lt_cv_cc_dll_switch=-mdll
    else
      echo "configure: failed program was:" >&5
      cat conftest.$ac_ext >&5
      rm -rf conftest*
      lt_cv_cc_dll_switch=-dll
    fi
    rm -f conftest*
    fi
    
    echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
        CFLAGS="$SAVE_CFLAGS" ;;
      *-*-cygwin* | *-*-pw32*)
        # cygwin systems need to pass --dll to the linker, and not link
        # crt.o which will require a WinMain@16 definition.
        lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
      esac
      ;;
      
    esac
    
    # Sed substitution that helps us do robust quoting.  It backslashifies
    # metacharacters that are still active within double-quoted strings.
    Xsed='sed -e s/^X//'
    sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
    
    # Same as above, but do not quote variable references.
    double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
    
    # Sed substitution to delay expansion of an escaped shell variable in a
    # double_quote_subst'ed string.
    delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
    
    # Constants:
    rm="rm -f"
    
    # Global variables:
    default_ofile=libtool
    can_build_shared=yes
    
    # All known linkers require a `.a' archive for static linking (except M$VC,
    # which needs '.lib').
    libext=a
    ltmain="$ac_aux_dir/ltmain.sh"
    ofile="$default_ofile"
    with_gnu_ld="$lt_cv_prog_gnu_ld"
    need_locks="$enable_libtool_lock"
    
    old_CC="$CC"
    old_CFLAGS="$CFLAGS"
    
    # Set sane defaults for various variables
    test -z "$AR" && AR=ar
    test -z "$AR_FLAGS" && AR_FLAGS=cru
    test -z "$AS" && AS=as
    test -z "$CC" && CC=cc
    test -z "$DLLTOOL" && DLLTOOL=dlltool
    test -z "$LD" && LD=ld
    test -z "$LN_S" && LN_S="ln -s"
    test -z "$MAGIC_CMD" && MAGIC_CMD=file
    test -z "$NM" && NM=nm
    test -z "$OBJDUMP" && OBJDUMP=objdump
    test -z "$RANLIB" && RANLIB=:
    test -z "$STRIP" && STRIP=:
    test -z "$ac_objext" && ac_objext=o
    
    if test x"$host" != x"$build"; then
      ac_tool_prefix=${host_alias}-
    else
      ac_tool_prefix=
    fi
    
    # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
    case $host_os in
    linux-gnu*) ;;
    linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
    esac
    
    case $host_os in
    aix3*)
      # AIX sometimes has problems with the GCC collect2 program.  For some
      # reason, if we set the COLLECT_NAMES environment variable, the problems
      # vanish in a puff of smoke.
      if test "X${COLLECT_NAMES+set}" != Xset; then
        COLLECT_NAMES=
        export COLLECT_NAMES
      fi
      ;;
    esac
    
    # Determine commands to create old-style static archives.
    old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
    old_postinstall_cmds='chmod 644 $oldlib'
    old_postuninstall_cmds=
    
    if test -n "$RANLIB"; then
      case $host_os in
      openbsd*)
        old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
        ;;
      *)
        old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
        ;;
      esac
      old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
    fi
    
    # Allow CC to be a program name with arguments.
    set dummy $CC
    compiler="$2"
    
    echo $ac_n "checking for objdir""... $ac_c" 1>&6
    
    echo "configure:4958: checking for objdir" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    rm -f .libs 2>/dev/null
    mkdir .libs 2>/dev/null
    if test -d .libs; then
      objdir=.libs
    else
      # MS-DOS does not allow filenames that begin with a dot.
      objdir=_libs
    fi
    rmdir .libs 2>/dev/null
    echo "$ac_t""$objdir" 1>&6
    
    
    # Check whether --with-pic or --without-pic was given.
    if test "${with_pic+set}" = set; then
      withval="$with_pic"
      pic_mode="$withval"
    else
      pic_mode=default
    fi
    
    test -z "$pic_mode" && pic_mode=default
    
    # We assume here that the value for lt_cv_prog_cc_pic will not be cached
    # in isolation, and that seeing it set (from the cache) indicates that
    # the associated values are set (in the cache) correctly too.
    echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
    
    echo "configure:4985: checking for $compiler option to produce PIC" >&5
    
    Kurt Zeilenga's avatar
    Kurt Zeilenga committed
    if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
      echo $ac_n "(cached) $ac_c" 1>&6
    else
       lt_cv_prog_cc_pic=
      lt_cv_prog_cc_shlib=
      lt_cv_prog_cc_wl=
      lt_cv_prog_cc_static=
      lt_cv_prog_cc_no_builtin=
      lt_cv_prog_cc_can_build_shared=$can_build_shared
    
      if test "$GCC" = yes; then
        lt_cv_prog_cc_wl='-Wl,'
        lt_cv_prog_cc_static='-static'
    
        case $host_os in
        aix*)