home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / gnupatch-2.1 / config.status < prev    next >
Encoding:
Text File  |  1995-06-18  |  5.5 KB  |  156 lines

  1. #!/bin/sh
  2. # Generated automatically by configure.
  3. # Run this file to recreate the current configuration.
  4. # This directory was configured as follows,
  5. # on host roc.scocan.sco.com:
  6. #
  7. # ./configure --prefix=/usr/local/contrib
  8.  
  9. for arg
  10. do
  11.   case "$arg" in
  12.     -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  13.     exec /bin/sh ./configure --prefix=/usr/local/contrib ;;
  14.     *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  15.   esac
  16. done
  17.  
  18. trap 'rm -f Makefile config.h conftest*; exit 1' 1 3 15
  19. CC='cc'
  20. CPP='${CC-cc} -E'
  21. INSTALL='bsdinstall -c'
  22. INSTALL_PROGRAM='$(INSTALL)'
  23. INSTALL_DATA='$(INSTALL)'
  24. LIBOBJS=''
  25. ALLOCA='alloca.o'
  26. LIBS=''
  27. srcdir='.'
  28. prefix='/usr/local/contrib'
  29. exec_prefix='${prefix}'
  30. prsub='s%^prefix\([     ]*\)=\([     ]*\).*$%prefix\1=\2/usr/local/contrib%
  31. s%^exec_prefix\([     ]*\)=\([     ]*\).*$%exec_prefix\1=\2${prefix}%'
  32.  
  33. top_srcdir=$srcdir
  34.  
  35. # Allow make-time overrides of the generated file list.
  36. test -n "$gen_files" || gen_files="Makefile"
  37.  
  38. for file in .. $gen_files; do if [ "x$file" != "x.." ]; then
  39.   srcdir=$top_srcdir
  40.   # Remove last slash and all that follows it.  Not all systems have dirname.
  41.   dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  42.   if test "$dir" != "$file"; then
  43.     test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  44.     test ! -d $dir && mkdir $dir
  45.   fi
  46.   echo creating $file
  47.   rm -f $file
  48.   echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  49.   sed -e "
  50. $prsub
  51. s%@CC@%$CC%g
  52. s%@CPP@%$CPP%g
  53. s%@INSTALL@%$INSTALL%g
  54. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  55. s%@INSTALL_DATA@%$INSTALL_DATA%g
  56. s%@LIBOBJS@%$LIBOBJS%g
  57. s%@ALLOCA@%$ALLOCA%g
  58. s%@LIBS@%$LIBS%g
  59. s%@srcdir@%$srcdir%g
  60. s%@DEFS@%-DHAVE_CONFIG_H%" $top_srcdir/${file}.in >> $file
  61. fi; done
  62. test -n "$gen_config" || gen_config=config.h
  63. echo creating $gen_config
  64. # These sed commands are put into SEDDEFS when defining a macro.
  65. # They are broken into pieces to make the sed script easier to manage.
  66. # They are passed to sed as "A NAME B NAME C VALUE D", where NAME
  67. # is the cpp macro being defined and VALUE is the value it is being given.
  68. # Each defining turns into a single global substitution command.
  69. #
  70. # SEDd sets the value in "#define NAME VALUE" lines.
  71. SEDdA='s@^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  72. SEDdB='\([     ][     ]*\)[^     ]*@\1#\2'
  73. SEDdC='\3'
  74. SEDdD='@g'
  75. # SEDu turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  76. SEDuA='s@^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  77. SEDuB='\([     ]\)@\1#\2define\3'
  78. SEDuC=' '
  79. SEDuD='\4@g'
  80. # SEDe turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  81. SEDeA='s@^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  82. SEDeB='$@\1#\2define\3'
  83. SEDeC=' '
  84. SEDeD='@g'
  85. rm -f conftest.sed
  86. cat >> conftest.sed <<CONFEOF
  87. ${SEDdA}DIRENT${SEDdB}DIRENT${SEDdC}1${SEDdD}
  88. ${SEDuA}DIRENT${SEDuB}DIRENT${SEDuC}1${SEDuD}
  89. ${SEDeA}DIRENT${SEDeB}DIRENT${SEDeC}1${SEDeD}
  90. ${SEDdA}RETSIGTYPE${SEDdB}RETSIGTYPE${SEDdC}void${SEDdD}
  91. ${SEDuA}RETSIGTYPE${SEDuB}RETSIGTYPE${SEDuC}void${SEDuD}
  92. ${SEDeA}RETSIGTYPE${SEDeB}RETSIGTYPE${SEDeC}void${SEDeD}
  93. ${SEDdA}STDC_HEADERS${SEDdB}STDC_HEADERS${SEDdC}1${SEDdD}
  94. ${SEDuA}STDC_HEADERS${SEDuB}STDC_HEADERS${SEDuC}1${SEDuD}
  95. ${SEDeA}STDC_HEADERS${SEDeB}STDC_HEADERS${SEDeC}1${SEDeD}
  96. CONFEOF
  97. cat >> conftest.sed <<CONFEOF
  98. ${SEDdA}HAVE_UNISTD_H${SEDdB}HAVE_UNISTD_H${SEDdC}1${SEDdD}
  99. ${SEDuA}HAVE_UNISTD_H${SEDuB}HAVE_UNISTD_H${SEDuC}1${SEDuD}
  100. ${SEDeA}HAVE_UNISTD_H${SEDeB}HAVE_UNISTD_H${SEDeC}1${SEDeD}
  101. ${SEDdA}HAVE_STRING_H${SEDdB}HAVE_STRING_H${SEDdC}1${SEDdD}
  102. ${SEDuA}HAVE_STRING_H${SEDuB}HAVE_STRING_H${SEDuC}1${SEDuD}
  103. ${SEDeA}HAVE_STRING_H${SEDeB}HAVE_STRING_H${SEDeC}1${SEDeD}
  104. ${SEDdA}HAVE_FCNTL_H${SEDdB}HAVE_FCNTL_H${SEDdC}1${SEDdD}
  105. ${SEDuA}HAVE_FCNTL_H${SEDuB}HAVE_FCNTL_H${SEDuC}1${SEDuD}
  106. ${SEDeA}HAVE_FCNTL_H${SEDeB}HAVE_FCNTL_H${SEDeC}1${SEDeD}
  107. CONFEOF
  108. cat >> conftest.sed <<CONFEOF
  109. ${SEDdA}HAVE_PATHCONF${SEDdB}HAVE_PATHCONF${SEDdC}1${SEDdD}
  110. ${SEDuA}HAVE_PATHCONF${SEDuB}HAVE_PATHCONF${SEDuC}1${SEDuD}
  111. ${SEDeA}HAVE_PATHCONF${SEDeB}HAVE_PATHCONF${SEDeC}1${SEDeD}
  112. ${SEDdA}HAVE_STRERROR${SEDdB}HAVE_STRERROR${SEDdC}1${SEDdD}
  113. ${SEDuA}HAVE_STRERROR${SEDuB}HAVE_STRERROR${SEDuC}1${SEDuD}
  114. ${SEDeA}HAVE_STRERROR${SEDeB}HAVE_STRERROR${SEDeC}1${SEDeD}
  115. ${SEDdA}STACK_DIRECTION${SEDdB}STACK_DIRECTION${SEDdC}-1${SEDdD}
  116. ${SEDuA}STACK_DIRECTION${SEDuB}STACK_DIRECTION${SEDuC}-1${SEDuD}
  117. ${SEDeA}STACK_DIRECTION${SEDeB}STACK_DIRECTION${SEDeC}-1${SEDeD}
  118. CONFEOF
  119. # This sed command replaces #undef's with comments.  This is necessary, for
  120. # example, in the case of _POSIX_SOURCE, which is predefined and required
  121. # on some systems where configure will not decide to define it in
  122. # config.h.
  123. cat >> conftest.sed <<\CONFEOF
  124. s,^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
  125. CONFEOF
  126. rm -f conftest.h
  127. # Break up the sed commands because old seds have small limits.
  128. maxsedlines=20
  129. cp $top_srcdir/$gen_config.in conftest.h1
  130. while :
  131. do
  132.   lines=`grep -c . conftest.sed`
  133.   if test -z "$lines" || test "$lines" -eq 0; then break; fi
  134.   rm -f conftest.s1 conftest.s2 conftest.h2
  135.   sed ${maxsedlines}q conftest.sed > conftest.s1 # Like head -20.
  136.   sed 1,${maxsedlines}d conftest.sed > conftest.s2 # Like tail +21.
  137.   sed -f conftest.s1 < conftest.h1 > conftest.h2
  138.   rm -f conftest.s1 conftest.h1 conftest.sed
  139.   mv conftest.h2 conftest.h1
  140.   mv conftest.s2 conftest.sed
  141. done
  142. rm -f conftest.sed conftest.h
  143. echo "/* $gen_config.  Generated automatically by configure.  */" > conftest.h
  144. cat conftest.h1 >> conftest.h
  145. rm -f conftest.h1
  146. if cmp -s $gen_config conftest.h 2>/dev/null; then
  147.   # The file exists and we would not be changing it.
  148.   rm -f conftest.h
  149. else
  150.   rm -f $gen_config
  151.   mv conftest.h $gen_config
  152. fi
  153.  
  154.  
  155. exit 0
  156.