autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AC_LN_S: Detect DJGPP < 2.04 (only .exe symlinks)


From: Tim Van Holder
Subject: AC_LN_S: Detect DJGPP < 2.04 (only .exe symlinks)
Date: Sat, 20 Jan 2001 00:14:51 +0100

2001-01-19  Tim Van Holder  <address@hidden>

        * acspecific.m4 (AC_PROG_LN_S): Detect DJGPP < 2.04, which only
        supports 'ln -s' for executables.

Index: acspecific.m4
===================================================================
RCS file: /cvs/autoconf/acspecific.m4,v
retrieving revision 1.327
diff -c -r1.327 acspecific.m4
*** acspecific.m4       2001/01/18 09:16:39     1.327
--- acspecific.m4       2001/01/19 23:05:46
***************
*** 269,284 ****
  AC_DEFUN([AC_PROG_LN_S],
  [AC_MSG_CHECKING([whether ln -s works])
  AC_CACHE_VAL(ac_cv_prog_LN_S,
! [rm -f conftest.sym conftest.file
  echo >conftest.file
! if ln -s conftest.file conftest.sym 2>/dev/null; then
!   ac_cv_prog_LN_S="ln -s"
! elif ln conftest.file conftest.sym 2>/dev/null; then
    ac_cv_prog_LN_S=ln
  else
    ac_cv_prog_LN_S=cp
  fi
! rm -f conftest.sym conftest.file])dnl
  AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
  if test "$ac_cv_prog_LN_S" = "ln -s"; then
    AC_MSG_RESULT([yes])
--- 269,293 ----
  AC_DEFUN([AC_PROG_LN_S],
  [AC_MSG_CHECKING([whether ln -s works])
  AC_CACHE_VAL(ac_cv_prog_LN_S,
! [rm -f conftest conftest.exe conftest.file
  echo >conftest.file
! dnl Don't use conftest.sym to avoid filename issues on DJGPP, where this
! dnl would yield conftest.sym.exe for DJGPP < 2.04.
! if ln -s conftest.file conftest 2>/dev/null; then
!   # We could just check for DJGPP; but this test a) works b) is more generic
!   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
!   if test -f conftest.exe; then
!     ac_cv_prog_LN_S="cp -p" # Don't use ln at all; we don't have any links
!   else
!     ac_cv_prog_LN_S="ln -s"
!   fi
! elif ln conftest.file conftest 2>/dev/null; then
    ac_cv_prog_LN_S=ln
  else
    ac_cv_prog_LN_S=cp
  fi
! rm -f conftest conftest.exe conftest.file])dnl
! ac_ln_s=$ac_cv_prog_LN_S
  AC_SUBST([LN_S], [$ac_cv_prog_LN_S])
  if test "$ac_cv_prog_LN_S" = "ln -s"; then
    AC_MSG_RESULT([yes])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]