/[autoconf]/autoconf/lib/m4sugar/m4sh.m4
ViewVC logotype

Diff of /autoconf/lib/m4sugar/m4sh.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.66 by eggert, Fri Oct 19 00:20:03 2001 UTC revision 1.67 by eggert, Fri Oct 26 19:52:43 2001 UTC
# Line 459  else Line 459  else
459  fi  fi
460  ])# _AS_EXPR_PREPARE  ])# _AS_EXPR_PREPARE
461    
462    # _AS_LINENO_WORKS
463    # ---------------
464    # Succeed if the currently executing shell supports LINENO.
465    m4_define([_AS_LINENO_WORKS],
466    [{
467      as_lineno_1=$LINENO
468      as_lineno_2=$LINENO
469      as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
470      test "x$as_lineno_1" != "x$as_lineno_2" &&
471      test "x$as_lineno_3"  = "x$as_lineno_2"
472    }])
473    
474  # _AS_LINENO_PREPARE  # _AS_LINENO_PREPARE
475  # ------------------  # ------------------
# Line 473  fi Line 484  fi
484  # it protects us from repetitive rewrites.  Be sure to have a test  # it protects us from repetitive rewrites.  Be sure to have a test
485  # that does detect non LINENO support...  # that does detect non LINENO support...
486  m4_define([_AS_LINENO_PREPARE],  m4_define([_AS_LINENO_PREPARE],
487  [as_command='  [_AS_LINENO_WORKS || {
   as_lineno_1=$LINENO  
   as_lineno_2=$LINENO  
   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`  
   test "x$as_lineno_1" != "x$as_lineno_2" &&  
   test "x$as_lineno_3"  = "x$as_lineno_2"  
 '  
 if eval "$as_command"; then  
   :  
 else  
488    # Find who we are.  Look in the path if we contain no path at all    # Find who we are.  Look in the path if we contain no path at all
489    # relative or not.    # relative or not.
490    case $[0] in    case $[0] in
# Line 505  else Line 507  else
507        [for as_base in sh bash ksh sh5; do        [for as_base in sh bash ksh sh5; do
508           case $as_dir in           case $as_dir in
509           /*)           /*)
510             if ("$as_dir/$as_base" -c "$as_command") 2>/dev/null; then             if ("$as_dir/$as_base" -c '_AS_LINENO_WORKS') 2>/dev/null; then
511               CONFIG_SHELL=$as_dir/$as_base               CONFIG_SHELL=$as_dir/$as_base
512               export CONFIG_SHELL               export CONFIG_SHELL
513               exec "$CONFIG_SHELL" "$[0]" ${1+"$[@]"}               exec "$CONFIG_SHELL" "$[0]" ${1+"$[@]"}
# Line 533  else Line 535  else
535    . ./$as_me.lineno    . ./$as_me.lineno
536    # Exit status is that of the last command.    # Exit status is that of the last command.
537    exit    exit
538  fi  }
539  ])# _AS_LINENO_PREPARE  ])# _AS_LINENO_PREPARE
540    
541    

Legend:
Removed from v.1.66  
changed lines
  Added in v.1.67

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26