config.sed 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. # DJGPP specific configuration file.
  2. # Sed script for additional DJGPP specific editing
  3. # of the configure script generated by autoconf 2.60.
  4. # Additional editing of Makefiles
  5. /^".*ac_file_inputs.*tmp\/out$/ a\
  6. cat > "$tmp/subs-3.sed" << eof_djgpp\
  7. # DJGPP specific Makefile changes.\
  8. s,\\.deps,_deps,g\
  9. s,\\.libs,_libs,g\
  10. s,\\.new\\.,_new.,g\
  11. s,\\.old\\.,_old.,g\
  12. s,\\.tab\\.,_tab.,g\
  13. s,config\\.h\\.in,config.h-in,g\
  14. s,\\.\\([1-9]\\)\\.html,.\\1-html,g\
  15. s,\\.html,-html,g\
  16. s,libcharset\\.h\\.in,libcharset.h-in,g\
  17. s,localcharset\\.h\\.inst,localcharset_h.ins,g\
  18. s,localcharset\\.h\\.in,localcharset.h-in,g\
  19. s,localcharset\\.h\\.build\\.in,localcharset.h-build-in,g\
  20. s,Makefile\\.am\\.in,Makefile.am-in,g\
  21. s,Makefile\\.in\\.in,Makefile.in-in,g\
  22. /^\\.y\\.c:/,/^$/ {\
  23. /\\\$(YACCCOMPILE)/ {\
  24. a\\\\\
  25. -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\\\
  26. -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
  27. }\
  28. }\
  29. eof_djgpp\
  30. sed -f "\$tmp/subs-3.sed" \$tmp/out > \$tmp/out.djgpp\
  31. mv -f \$tmp/out.djgpp \$tmp/out
  32. # Rename config.h.in into config.h-in
  33. /ac_config_headers=/s|config\.h|&:config.h-in|g
  34. /CONFIG_HEADERS=/ s|config\.h\.in|&:config.h-in|2
  35. # Rename localcharset.h.build.in, localcharset.h.inst, localcharset.h.in and Makefile.in.in into localcharset.h-build-in, localcharset_h.ins, localcharset.h-in and Makefile.in-in
  36. /ac_config_files=/ {
  37. s|localcharset\.h\.build\.in|localcharset.h-build-in|
  38. s|localcharset\.h\.inst|localcharset_h.ins|
  39. s|localcharset\.h\.in|localcharset.h-in|
  40. s|po/Makefile\.in|&:po/Makefile.in-in|
  41. }
  42. /CONFIG_FILES=/ {
  43. s|localcharset\.h\.build\.in|localcharset.h-build-in|
  44. s|localcharset\.h\.inst|localcharset_h.ins|
  45. s|localcharset\.h\.in|localcharset.h-in|
  46. s|po/Makefile\.in|&:po/Makefile.in-in|2
  47. }
  48. # We always use _deps and _libs instead of .deps and .libs, because
  49. # the latter is an invalid name on 8+3 MS-DOS file system. This makes
  50. # the generated Makefiles good for every DJGPP installation, not only
  51. # the one where the package was configured (which could happen to be
  52. # a Windows box, where leading dots in file names are allowed).
  53. s,\.deps,_deps,g
  54. s,\.libs,_libs,g
  55. /^rmdir[ ]*\.tst/ i\
  56. am__leading_dot=_
  57. # Replace (command) > /dev/null with `command > /dev/null`, since
  58. # parenthesized commands always return zero status in the ported Bash,
  59. # even if the named command doesn't exist
  60. /if ([^|;`]*null/{
  61. s,(,`,
  62. s,),,
  63. /null[ ]*2>&1/ s,2>&1,&`,
  64. /null.*null/ s,null.*null,&`,
  65. /null.*null/ !{
  66. /null[ ]*2>&1/ !s,null,&`,
  67. }
  68. }
  69. # DOS-style absolute file names should be supported as well
  70. /\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
  71. # The following two items are changes needed for configuring
  72. # and compiling across partitions.
  73. # 1) The given srcdir value is always translated from the
  74. # "x:" syntax into "/dev/x" syntax while we run configure.
  75. /^[ ]*-srcdir=\*.*$/ a\
  76. ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
  77. /set X `ls -Lt \$srcdir/ i\
  78. if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
  79. srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
  80. fi
  81. # Autoconf 2.52e generated configure scripts
  82. # write absolute paths into Makefiles and bison.in
  83. # making them useless for DJGPP installations for
  84. # which the package has not been configured for.
  85. /MISSING=/,/^$/ {
  86. /^fi$/ a\
  87. am_missing_run=`echo "$am_missing_run" | sed 's%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
  88. }
  89. /^install_sh=/a\
  90. install_sh=`echo "$install_sh" | sed 's%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
  91. # This will only work if the assumption that the
  92. # testsuite is ran from the following path:
  93. # ${top_srcdir}/tests/testsuite.dir
  94. # holds. The explicit names are of no importance.
  95. # ../../. == ${top_srcdir}
  96. #/^esac$/,/^ac_abs_srcdir=/ {
  97. /^ac_abs_srcdir=/ i\
  98. ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
  99. ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
  100. ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`
  101. #ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev/.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/libcharset[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`
  102. /^ac_abs_srcdir=/ a\
  103. for dj_dir in $ac_abs_builddir $ac_abs_top_builddir $ac_abs_top_srcdir $ac_abs_srcdir\
  104. do\
  105. ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%//%/%g"`\
  106. ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%//%/%g"`\
  107. ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%//%/%g"`\
  108. ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%//%/%g"`\
  109. done
  110. # Add DJGPP version information.
  111. /^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/
  112. # We need makeinfo to make the html formated docs.
  113. /\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,,
  114. # The path to the FORTRAN compiler and libraries
  115. # shall contain no absolute path reference so it
  116. # will be good for all djgpp installations.
  117. /^FLIBS="\$ac_cv_flibs"/ i\
  118. ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
  119. ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
  120. # Autoconf generated configure scripts write absolute
  121. # paths of certain header files into Makefiles making
  122. # them useless for DJGPP installations for which the
  123. # package has not been configured for.
  124. /^.*echo "\$as_me:\$LINENO: result: \$gl_cv_absolute_.*$/ {
  125. h
  126. s,^.*\(gl_cv_absolute_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
  127. G
  128. }
  129. /^.*echo "\$as_me:\$LINENO: result: \$gl_cv_full_.*$/ {
  130. h
  131. s,^.*\(gl_cv_full_\)\([a-z0-9_]*\)\(_h\).*$,\1\2\3=`echo $\1\2\3 | sed "s%[^:]:.*/include/%/dev/env/DJDIR/include/%"`,
  132. G
  133. }