OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [config/] [lib-ld.m4] - Diff between revs 158 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 158 Rev 816
# lib-ld.m4 serial 2 (gettext-0.12)
# lib-ld.m4 serial 2 (gettext-0.12)
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.
dnl the same distribution terms as the rest of that program.
 
 
dnl Subroutines of libtool.m4,
dnl Subroutines of libtool.m4,
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
dnl with libtool.m4.
dnl with libtool.m4.
 
 
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
AC_DEFUN([AC_LIB_PROG_LD_GNU],
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  acl_cv_prog_gnu_ld=yes
  acl_cv_prog_gnu_ld=yes
else
else
  acl_cv_prog_gnu_ld=no
  acl_cv_prog_gnu_ld=no
fi])
fi])
with_gnu_ld=$acl_cv_prog_gnu_ld
with_gnu_ld=$acl_cv_prog_gnu_ld
])
])
 
 
dnl From libtool-1.4. Sets the variable LD.
dnl From libtool-1.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
AC_DEFUN([AC_LIB_PROG_LD],
[AC_ARG_WITH(gnu-ld,
[AC_ARG_WITH(gnu-ld,
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
# Prepare PATH_SEPARATOR.
# Prepare PATH_SEPARATOR.
# The user is always right.
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
if test "${PATH_SEPARATOR+set}" != set; then
  echo "#! /bin/sh" >conf$$.sh
  echo "#! /bin/sh" >conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  echo  "exit 0"   >>conf$$.sh
  chmod +x conf$$.sh
  chmod +x conf$$.sh
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
    PATH_SEPARATOR=';'
    PATH_SEPARATOR=';'
  else
  else
    PATH_SEPARATOR=:
    PATH_SEPARATOR=:
  fi
  fi
  rm -f conf$$.sh
  rm -f conf$$.sh
fi
fi
ac_prog=ld
ac_prog=ld
if test "$GCC" = yes; then
if test "$GCC" = yes; then
  # Check if gcc -print-prog-name=ld gives a path.
  # Check if gcc -print-prog-name=ld gives a path.
  AC_MSG_CHECKING([for ld used by GCC])
  AC_MSG_CHECKING([for ld used by GCC])
  case $host in
  case $host in
  *-*-mingw*)
  *-*-mingw*)
    # gcc leaves a trailing carriage return which upsets mingw
    # gcc leaves a trailing carriage return which upsets mingw
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  *)
  *)
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  esac
  esac
  case $ac_prog in
  case $ac_prog in
    # Accept absolute paths.
    # Accept absolute paths.
    [[\\/]* | [A-Za-z]:[\\/]*)]
    [[\\/]* | [A-Za-z]:[\\/]*)]
      [re_direlt='/[^/][^/]*/\.\./']
      [re_direlt='/[^/][^/]*/\.\./']
      # Canonicalize the path of ld
      # Canonicalize the path of ld
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
        ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
      done
      done
      test -z "$LD" && LD="$ac_prog"
      test -z "$LD" && LD="$ac_prog"
      ;;
      ;;
  "")
  "")
    # If it fails, then pretend we aren't using GCC.
    # If it fails, then pretend we aren't using GCC.
    ac_prog=ld
    ac_prog=ld
    ;;
    ;;
  *)
  *)
    # If it is relative, then search for the first ld in PATH.
    # If it is relative, then search for the first ld in PATH.
    with_gnu_ld=unknown
    with_gnu_ld=unknown
    ;;
    ;;
  esac
  esac
elif test "$with_gnu_ld" = yes; then
elif test "$with_gnu_ld" = yes; then
  AC_MSG_CHECKING([for GNU ld])
  AC_MSG_CHECKING([for GNU ld])
else
else
  AC_MSG_CHECKING([for non-GNU ld])
  AC_MSG_CHECKING([for non-GNU ld])
fi
fi
AC_CACHE_VAL(acl_cv_path_LD,
AC_CACHE_VAL(acl_cv_path_LD,
[if test -z "$LD"; then
[if test -z "$LD"; then
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
  for ac_dir in $PATH; do
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    test -z "$ac_dir" && ac_dir=.
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
      acl_cv_path_LD="$ac_dir/$ac_prog"
      acl_cv_path_LD="$ac_dir/$ac_prog"
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # Check to see if the program is GNU ld.  I'd rather use --version,
      # but apparently some GNU ld's only accept -v.
      # but apparently some GNU ld's only accept -v.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      # Break only if it was the GNU/non-GNU ld that we prefer.
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
      if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
        test "$with_gnu_ld" != no && break
        test "$with_gnu_ld" != no && break
      else
      else
        test "$with_gnu_ld" != yes && break
        test "$with_gnu_ld" != yes && break
      fi
      fi
    fi
    fi
  done
  done
  IFS="$ac_save_ifs"
  IFS="$ac_save_ifs"
else
else
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
  acl_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
fi])
LD="$acl_cv_path_LD"
LD="$acl_cv_path_LD"
if test -n "$LD"; then
if test -n "$LD"; then
  AC_MSG_RESULT($LD)
  AC_MSG_RESULT($LD)
else
else
  AC_MSG_RESULT(no)
  AC_MSG_RESULT(no)
fi
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_LIB_PROG_LD_GNU
AC_LIB_PROG_LD_GNU
])
])
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.