]> git.saurik.com Git - bison.git/blob - djgpp/config.sed
* NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
[bison.git] / djgpp / config.sed
1 # DJGPP specific configuration file.
2 # Sed script for additional DJGPP specific editing
3 # of the configure script generated by autoconf 2.60.
4
5
6 # Copyright (C) 2005, 2006 Free Software Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22
23 # Additional editing of Makefiles
24 /^".*ac_file_inputs.*tmp\/out$/ a\
25 cat > "$tmp/subs-3.sed" << eof_djgpp\
26 # DJGPP specific Makefile changes.\
27 /^aliaspath * *=/s,:,";",g\
28 /TEXINPUTS=/s,:,";",g\
29 /PATH=/s,:,";",g\
30 s,\\.deps,_deps,g\
31 s,\\.libs,_libs,g\
32 s,\\.new\\.,_new.,g\
33 s,\\.old\\.,_old.,g\
34 s,\\.tab\\.,_tab.,g\
35 s,c++\\.at,cxx.at,g\
36 s,c++\\.m4,cxx.m4,g\
37 s,calc++,calcxx,g\
38 s,scan-gram-c,c-scan-gram,g\
39 s,scan-skel-c,c-scan-skel,g\
40 s,Makefile\\.am\\.in,Makefile.am-in,g\
41 s,Makefile\\.in\\.in,Makefile.in-in,g\
42 /^\\.y\\.c:/,/^$/ {\
43 /\\\$(YACCCOMPILE)/ {\
44 a\\\\\
45 -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\\\
46 -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
47 }\
48 }\
49 /^libbison.a:/ i\\\\\
50 \\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\\\
51 subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\\\
52 \\$(COMPILE) -c \\$<\
53 /^yacc:/ i\\\\\
54 yacc.bat:\\\\\
55 echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >\\$@\
56 /^bin_SCRIPTS =/s/$/ yacc.bat/\
57 /^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/\
58 eof_djgpp\
59 sed -f "\$tmp/subs-3.sed" \$tmp/out > \$tmp/out.djgpp\
60 mv -f \$tmp/out.djgpp \$tmp/out
61
62
63 # Makefile.in.in is renamed to Makefile.in-in.
64 /ac_config_files=/ {
65 /runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|
66 s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|
67 }
68
69 /CONFIG_FILES=/ {
70 /runtime-po/!s|po/Makefile\.in|&:po/Makefile.in-in|2
71 s|runtime-po/Makefile\.in|&:runtime-po/Makefile.in-in|2
72 }
73
74 # We always use _deps and _libs instead of .deps and .libs, because
75 # the latter is an invalid name on 8+3 MS-DOS file system. This makes
76 # the generated Makefiles good for every DJGPP installation, not only
77 # the one where the package was configured (which could happen to be
78 # a Windows box, where leading dots in file names are allowed).
79 /^rmdir[ ]*\.tst/ i\
80 am__leading_dot=_
81
82 # Replace (command) > /dev/null with `command > /dev/null`, since
83 # parenthesized commands always return zero status in the ported Bash,
84 # even if the named command doesn't exist
85 /if ([^|;`]*null/{
86 s,(,`,
87 s,),,
88 /null[ ]*2>&1/ s,2>&1,&`,
89 /null.*null/ s,null.*null,&`,
90 /null.*null/ !{
91 /null[ ]*2>&1/ !s,null,&`,
92 }
93 }
94
95 # DOS-style absolute file names should be supported as well
96 /\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,
97
98 # The following two items are changes needed for configuring
99 # and compiling across partitions.
100 # 1) The given srcdir value is always translated from the
101 # "x:" syntax into "/dev/x" syntax while we run configure.
102 /^[ ]*-srcdir=\*.*$/ a\
103 ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
104 /set X `ls -Lt \$srcdir/ i\
105 if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
106 srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
107 fi
108
109 # Autoconf 2.52e generated configure scripts
110 # write absolute paths into Makefiles and bison.in
111 # making them useless for DJGPP installations for
112 # which the package has not been configured for.
113 /MISSING=/,/^$/ {
114 /^fi$/ a\
115 am_missing_run=`echo "$am_missing_run" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
116 }
117 /^install_sh=/a\
118 install_sh=`echo "$install_sh" | sed 's%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%${top_srcdir}%'`
119
120 # This will only work if the assumption that the
121 # testsuite is ran from the following path:
122 # ${top_srcdir}/tests/testsuite.dir
123 # holds. The explicit names are of no importance.
124 # ../../. == ${top_srcdir}
125 #/^esac$/,/^ac_abs_srcdir=/ {
126 /^ac_abs_srcdir=/ i\
127 ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
128 ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
129 ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`
130 #ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev/.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/bison[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`
131 /^ac_abs_srcdir=/ a\
132 for dj_dir in $ac_abs_builddir $ac_abs_top_builddir $ac_abs_top_srcdir $ac_abs_srcdir\
133 do\
134 ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%//%/%g"`\
135 ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%//%/%g"`\
136 ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%//%/%g"`\
137 ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%//%/%g"`\
138 done
139
140 # Add DJGPP version information.
141 /^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/
142
143 # We need makeinfo to make the html formated docs.
144 /\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,,
145
146 # The path to the FORTRAN compiler and libraries
147 # shall contain no absolute path reference so it
148 # will be good for all djgpp installations.
149 /^FLIBS="\$ac_cv_flibs"/ i\
150 ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
151 ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`
152
153 # The following is not a valid DOS file name
154 s/calc++/calcxx/g