[Bug c/14251] Use POSIX-compatible flags for 'head' and 'tail'

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 30 00:31:00 GMT 2004


------- Additional Comments From bangerth at dealii dot org  2004-04-29 22:34 -------
Here is one such macro, whether 'head' accepts '-n'. I don't have 
an archaic system sitting around, so I can't test whether it also 
works for systems without support for -n :-( 
 
AC_DEFUN(CHECK_HEAD, dnl 
[ 
  AC_PATH_PROG(HEAD,head) 
  if test "x$HEAD" = "x" ; then 
    AC_MSG_ERROR(program not found) 
  fi 
 
  AC_MSG_CHECKING(whether $HEAD accepts -n) 
  if $HEAD -n 1 /dev/null ; then 
    HEAD_HAS_MINUS_N=yes ; 
  else 
    HEAD_HAS_MINUS_N=no ; 
  fi 
  AC_MSG_RESULT($HEAD_HAS_MINUS_N) 
]) 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14251



More information about the Gcc-bugs mailing list