Skip to content
Snippets Groups Projects
configure 521 KiB
Newer Older
  rm -f $ac_dest

  # Make relative symlinks.
  ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
         X"$ac_dest" : 'X\(//\)[^/]' \| \
         X"$ac_dest" : 'X\(//\)$' \| \
         X"$ac_dest" : 'X\(/\)' \| \
         .     : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
  	  /^X\(\/\/\)$/{ s//\1/; q; }
  	  /^X\(\/\).*/{ s//\1/; q; }
  	  s/.*/./; q'`
  { case "$ac_dest_dir" in
  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
  *)                      as_incr_dir=.;;
esac
as_dummy="$ac_dest_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
  case $as_mkdir_dir in
    # Skip DOS drivespec
    ?:) as_incr_dir=$as_mkdir_dir ;;
    *)
      as_incr_dir=$as_incr_dir/$as_mkdir_dir
      test -d "$as_incr_dir" ||
        mkdir "$as_incr_dir" ||
	{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dest_dir\"" >&5
echo "$as_me: error: cannot create \"$ac_dest_dir\"" >&2;}
   { (exit 1); exit 1; }; }
    ;;
  esac
done; }

  ac_builddir=.

if test "$ac_dest_dir" != .; then
  ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
  # A "../" for each directory in $ac_dir_suffix.
  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
  ac_dir_suffix= ac_top_builddir=
fi

case $srcdir in
  .)  # No --srcdir option.  We are building in place.
    ac_srcdir=.
    if test -z "$ac_top_builddir"; then
       ac_top_srcdir=.
    else
       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
    fi ;;
  [\\/]* | ?:[\\/]* )  # Absolute path.
    ac_srcdir=$srcdir$ac_dir_suffix;
    ac_top_srcdir=$srcdir ;;
  *) # Relative path.
    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
    ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Don't blindly perform a `cd "$ac_dest_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dest_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dest_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dest_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dest_dir" && cd $ac_top_srcdir && pwd`

  case $srcdir in
  [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
      *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
  esac

  # Make a symlink if possible; otherwise try a hard link.
  ln -s $ac_rel_source $ac_dest 2>/dev/null ||
    ln $srcdir/$ac_source $ac_dest ||
    { { echo "$as_me:$LINENO: error: cannot link $ac_dest to $srcdir/$ac_source" >&5
echo "$as_me: error: cannot link $ac_dest to $srcdir/$ac_source" >&2;}
   { (exit 1); exit 1; }; }
cat >>$CONFIG_STATUS <<\_ACEOF
ac_clean_files=$ac_clean_files_save


# configure is writing to config.log, and then calls config.status.
# config.status does its own redirection, appending to config.log.
# Unfortunately, on DOS this fails, as config.log is still kept open
# by configure, so config.status won't be able to write to it; its
# output is simply discarded.  So we exec the FD to /dev/null,
# effectively closing config.log, so it can be properly (re)opened and
# appended to by config.status.  When coming back to configure, we
# need to make the FD available again.
if test "$no_create" != yes; then
  ac_cs_success=:
  exec 5>/dev/null
  $SHELL $CONFIG_STATUS || ac_cs_success=false
  exec 5>>config.log
  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
  # would make configure fail if this is the last instruction.
  $ac_cs_success || { (exit 1); exit 1; }
fi

#
# We have to run the thread test here because it is an external program
# that has to be runable separately for cross-compiling.
#
if test "$enable_thread_safety" = yes; then
if test cross_compiling != yes; then
for ac_prog in gmake make
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
  if test -n "$MAKE"; then
  ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
  for ac_exec_ext in '' $ac_executable_extensions; do
  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_prog_MAKE="$ac_prog"
    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
done

fi
fi
MAKE=$ac_cv_prog_MAKE
if test -n "$MAKE"; then
  echo "$as_me:$LINENO: result: $MAKE" >&5
echo "${ECHO_T}$MAKE" >&6
else
  echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi

  test -n "$MAKE" && break
done

echo "$as_me:$LINENO: checking thread safety of required library functions." >&5
echo $ECHO_N "checking thread safety of required library functions.... $ECHO_C" >&6
#
# Clean, compile, run, and clean thread test directory.
# If test fails for any reason, remove Makefile.global so the user can't
# compile (to simulate a configure failure).
#
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
	( rm -f src/Makefile.global
	  { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
echo "$as_me: error: Can not clean thread test directory." >&2;}
   { (exit 1); exit 1; }; })
$MAKE -C $srcdir/src/tools/thread >&5 ||
	( rm -f src/Makefile.global
	  { { echo "$as_me:$LINENO: error: Can not build thread test proram." >&5
echo "$as_me: error: Can not build thread test proram." >&2;}
   { (exit 1); exit 1; }; })
$srcdir/src/tools/thread/thread_test >&5 ||
	( rm -f src/Makefile.global
	  echo "no"
	  $srcdir/src/tools/thread/thread_test
	  { { echo "$as_me:$LINENO: error: Thread test program failed.  Your platform is not thread-safe." >&5
echo "$as_me: error: Thread test program failed.  Your platform is not thread-safe." >&2;}
$MAKE -C $srcdir/src/tools/thread clean >&5 ||
	( rm -f src/Makefile.global
	  { { echo "$as_me:$LINENO: error: Can not clean thread test directory." >&5
echo "$as_me: error: Can not clean thread test directory." >&2;}
   { (exit 1); exit 1; }; })
echo "yes"
else
{ echo "$as_me:$LINENO: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in $srcdir/src/tools/thread on the target matchine.
" >&5
echo "$as_me: WARNING:
*** Skipping thread test program because of cross-compile build.
*** Run the program in $srcdir/src/tools/thread on the target matchine.
" >&2;}
fi
fi