how about this one?

#! /bin/sh -x

ac_nl='
'
IFS="   $ac_nl"

debug=:
me=`echo "$0" | sed 's,.*/,,'`
SHELL=${CONFIG_SHELL-/bin/sh}

config_files="Makefile"

ac_given_srcdir=.
ac_given_INSTALL="/usr/bin/install -c"
# If no file are specified by the user, then we need to provide default
# value.  By we need to know if files were specified by the user.
ac_need_defaults=:

CONFIG_FILES=$config_files

# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
  test -n "$tmp" && test -d "$tmp"
}  ||
{
  tmp=$TMPDIR/cs$$-$RANDOM
  (umask 077 && mkdir $tmp)
} ||
{
   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
   exit 1;
}


#
# CONFIG_FILES section.
#

# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "$CONFIG_FILES"; then
  # Protect against being on the right side of a sed subst in config.status.
  sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
   s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
s,@SHELL@,/bin/sh,;t t
s,@exec_prefix@,${prefix},;t t
s,@prefix@,/usr/local,;t t
s,@program_transform_name@,s,x,x,,;t t
s,@bindir@,${exec_prefix}/bin,;t t
s,@sbindir@,${exec_prefix}/sbin,;t t
s,@libexecdir@,${exec_prefix}/libexec,;t t
s,@datadir@,${prefix}/share,;t t
s,@sysconfdir@,${prefix}/etc,;t t
s,@sharedstatedir@,${prefix}/com,;t t
s,@localstatedir@,${prefix}/var,;t t
s,@libdir@,${exec_prefix}/lib,;t t
s,@includedir@,${prefix}/include,;t t
s,@oldincludedir@,/usr/include,;t t
s,@infodir@,${prefix}/info,;t t
s,@mandir@,${prefix}/man,;t t
s,@ECHO_C@,,;t t
s,@ECHO_N@,-n,;t t
s,@ECHO_T@,,;t t
s,@CFLAGS@,,;t t
s,@CPPFLAGS@,,;t t
s,@CXXFLAGS@,,;t t
s,@FFLAGS@,,;t t
s,@DEFS@, -DPACKAGE=\"autoconf\" -DVERSION=\"2.49b\" ,;t t
s,@LDFLAGS@,,;t t
s,@LIBS@,,;t t
s,@INSTALL_PROGRAM@,${INSTALL},;t t
s,@INSTALL_SCRIPT@,${INSTALL},;t t
s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
s,@PACKAGE@,autoconf,;t t
s,@VERSION@,2.49b,;t t
s,@ACLOCAL@,aclocal,;t t
s,@AUTOCONF@,autoconf,;t t
s,@AUTOMAKE@,automake,;t t
s,@AUTOHEADER@,autoheader,;t t
s,@MAKEINFO@,makeinfo,;t t
s,@SET_MAKE@,,;t t
s,@AT_TESTPATH@,..,;t t
s,@M4@,/usr/local/bin/m4,;t t
s,@AWK@,gawk,;t t
s,@HELP2MAN@,/bin/sh /export/tmpx51/daniele/downloads/cvs/autoconf/missing help2man,;t 
t
s,@PERL@,/usr/local/bin/perl,;t t
s,@PERLSCRIPTS@,autoscan,;t t
s,@standards_texi@,,;t t
CEOF

  # Split the substitutions into bite-sized pieces for seds with
  # small command number limits, like on Digital OSF/1 and HP-UX.
  ac_max_sed_lines=48
  ac_sed_frag=1 # Number of current file.
  ac_beg=1 # First line for current file.
  ac_end=$ac_max_sed_lines # Line after last line for current file.
  ac_more_lines=:
  ac_sed_cmds=
  while $ac_more_lines; do
    if test $ac_beg -gt 1; then
      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    else
      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
    fi
    if test ! -s $tmp/subs.frag; then
      ac_more_lines=false
    else
      # The purpose of the label and of the branching condition is to
      # speed up the sed processing (if there are no `@' at all, there
      # is no need to browse any of the substitutions).
      # These are the two extra sed commands mentioned above.
      (echo ':t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
      if test -z "$ac_sed_cmds"; then
        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
      else
        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
      fi
      ac_sed_frag=`expr $ac_sed_frag + 1`
      ac_beg=$ac_end
      ac_end=`expr $ac_end + $ac_max_sed_lines`
    fi
  done
  if test -z "$ac_sed_cmds"; then
    ac_sed_cmds=cat
  fi
fi # test -n "$CONFIG_FILES"

ac_file=$CONFIG_FILES
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  case $ac_file in
  - | *:- | *:-:* ) # input from stdin
        cat >$tmp/stdin
        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
  * )   ac_file_in=$ac_file.in ;;
  esac

  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  ac_dir=`expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
      X"$ac_file" : 'X\(//\)[^/]' \| \
      X"$ac_file" : 'X\(//\)$' \| \
      X"$ac_file" : 'X\(/\)' \| \
      .   : '\(.\)' 2>/dev/null ||
echo "X"$ac_file"" | sed '
            /^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
            /^X\(\/\/\)[^/].*/{ s//\1/; q; }
            /^X\(\/\/\)$/{ s//\1/; q; }
            /^X\(\/\).*/{ s//\1/; q; }
            s/.*/./; q'`
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
    { case "$ac_dir" in
  [\\/]* | ?:[\\/]* ) ac_incr_dir=;;
  *)                      ac_incr_dir=.;;
esac
ac_dummy=""$ac_dir""
for ac_mkdir_dir in `IFS=/; set X $ac_dummy; shift; echo "$@"`; do
  ac_incr_dir=$ac_incr_dir/$ac_mkdir_dir
  test -d $ac_incr_dir || mkdir $ac_incr_dir
done; }

    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
    # A "../" for each directory in $ac_dir_suffix.
    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
  else
    ac_dir_suffix= ac_dots=
  fi

  case $ac_given_srcdir in
  .)  srcdir=.
      if test -z "$ac_dots"; then top_srcdir=.
      else top_srcdir=`echo $ac_dots | sed 's,/$,,'`; fi ;;
  [\\/]* | ?:[\\/]* )
      srcdir=$ac_given_srcdir$ac_dir_suffix;
      top_srcdir=$ac_given_srcdir ;;
  *) # Relative path.
    srcdir=$ac_dots$ac_given_srcdir$ac_dir_suffix
    top_srcdir=$ac_dots$ac_given_srcdir ;;
  esac

  case $ac_given_INSTALL in
  [\\/$]* | ?:[\\/]* ) INSTALL=$ac_given_INSTALL ;;
  *) INSTALL=$ac_dots$ac_given_INSTALL ;;
  esac

  if test x"$ac_file" != x-; then
    echo creating $ac_file
    rm -f "$ac_file"
  fi
  configure_input="Generated automatically"

  # Don't redirect the output to AC_FILE directly: use `mv' so that
  # updating is atomic, and doesn't need trapping.

  # First look for the input files in the build tree, otherwise in the
  # src tree.
  ac_file_inputs=`IFS=:
    for f in $ac_file_in; do
      case $f in
      -) echo $tmp/stdin ;;
      [\\/$]* | ?:[\\/]*)
         # Absolute
         test -f "$f" || { echo "configure: error:" >&2; exit 1; }
         echo $f;;
      *) # Relative
         if test -f "$f"; then
           # Build tree
           echo $f
         elif test -f "$ac_given_srcdir/$f"; then
           # Source tree
           echo $ac_given_srcdir/$f
         else
           # /dev/null tree
           { echo "configure: error:" >&2; exit 1; }
         fi;;
      esac
    done` || { (exit 1); exit; }
  sed "/^[      ]*VPATH[        ]*=[^:]*$/d

:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$srcdir,;t t
s,@top_srcdir@,$top_srcdir,;t t
s,@INSTALL@,$INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
  rm -f $tmp/stdin
  if test x"$ac_file" != x-; then
    mv $tmp/out $ac_file
  else
    cat $tmp/out
    rm -f $tmp/out
  fi

exit 0

Reply via email to