From 3768a1ae181a50b4ee42713ef50377a2328c42f7 Mon Sep 17 00:00:00 2001 From: Juan Manuel Guerrero Date: Sun, 2 Oct 2005 16:35:14 +0000 Subject: [PATCH] DJGPP specific configuration file. --- djgpp/config.bat | 422 +++++++++++++++++++++++++++++++++++++++++++++ djgpp/config.sed | 141 +++++++++++++++ djgpp/config.site | 56 ++++++ djgpp/config_h.sed | 15 ++ 4 files changed, 634 insertions(+) create mode 100644 djgpp/config.bat create mode 100644 djgpp/config.sed create mode 100644 djgpp/config.site create mode 100644 djgpp/config_h.sed diff --git a/djgpp/config.bat b/djgpp/config.bat new file mode 100644 index 00000000..caea6b8a --- /dev/null +++ b/djgpp/config.bat @@ -0,0 +1,422 @@ +@echo off +echo Configuring GNU Bison for DJGPP v2.x... + +Rem The SmallEnv tests protect against fixed and too small size +Rem of the environment in stock DOS shell. + +Rem Find out if NLS is wanted or not, +Rem if dependency-tracking is wanted or not, +Rem if caching is wanted or not +Rem and where the sources are. +Rem We always default to NLS support, +Rem no dependency tracking +Rem and to in place configuration. +set ARGS= +set NLS=enabled +if not "%NLS%" == "enabled" goto SmallEnv +set CACHING=enabled +if not "%CACHING%" == "enabled" goto SmallEnv +set DEPENDENCY_TRACKING=disabled +if not "%DEPENDENCY_TRACKING%" == "disabled" goto SmallEnv +set LIBICONV_PREFIX=disabled +if not "%LIBICONV_PREFIX%" == "disabled" goto SmallEnv +set LIBINTL_PREFIX=disabled +if not "%LIBINTL_PREFIX%" == "disabled" goto SmallEnv +set HTML=enabled +if not "%HTML%" == "enabled" goto SmallEnv +set XSRC=. +if not "%XSRC%" == "." goto SmallEnv + +Rem Loop over all arguments. +Rem Special arguments are: NLS, XSRC, CACHE, STATIC_LIBS, LIBICONV_PREFIX, LIBINTL_PREFIX and DEPS. +Rem All other arguments are stored into ARGS. +:ArgLoop +if "%1" == "nls" goto NextArgument +if "%1" == "NLS" goto NextArgument +if "%1" == "no-nls" goto NoNLS +if "%1" == "no-NLS" goto NoNLS +if "%1" == "NO-NLS" goto NoNLS +goto CachingOption +:NoNLS +if "%1" == "no-nls" set NLS=disabled +if "%1" == "no-NLS" set NLS=disabled +if "%1" == "NO-NLS" set NLS=disabled +if not "%NLS%" == "disabled" goto SmallEnv +goto NextArgument +:CachingOption +if "%1" == "cache" goto NextArgument +if "%1" == "CACHE" goto NextArgument +if "%1" == "no-cache" goto NoCaching +if "%1" == "no-CACHE" goto NoCaching +if "%1" == "NO-CACHE" goto NoCaching +goto DependencyOption +:NoCaching +if "%1" == "no-cache" set CACHING=disabled +if "%1" == "no-CACHE" set CACHING=disabled +if "%1" == "NO-CACHE" set CACHING=disabled +if not "%CACHING%" == "disabled" goto SmallEnv +goto NextArgument +:DependencyOption +if "%1" == "no-dep" goto NextArgument +if "%1" == "no-DEP" goto NextArgument +if "%1" == "NO-DEP" goto NextArgument +if "%1" == "dep" goto DependecyTraking +if "%1" == "DEP" goto DependecyTraking +goto LibiconvPrefixOption +:DependecyTraking +if "%1" == "dep" set DEPENDENCY_TRACKING=enabled +if "%1" == "DEP" set DEPENDENCY_TRACKING=enabled +if not "%DEPENDENCY_TRACKING%" == "enabled" goto SmallEnv +goto NextArgument +:LibiconvPrefixOption +if "%1" == "no-libiconvprefix" goto NextArgument +if "%1" == "no-LIBICONVPREFIX" goto NextArgument +if "%1" == "NO-LIBICONVPREFIX" goto NextArgument +if "%1" == "libiconvprefix" goto WithLibiconvPrefix +if "%1" == "LIBICONVPREFIX" goto WithLibiconvPrefix +goto LibintlPrefixOption +:WithLibiconvPrefix +if "%1" == "libiconvprefix" set LIBICONV_PREFIX=enabled +if "%1" == "LIBICONVPREFIX" set LIBICONV_PREFIX=enabled +if not "%LIBICONV_PREFIX%" == "enabled" goto SmallEnv +goto NextArgument +:LibintlPrefixOption +if "%1" == "no-libiconvprefix" goto NextArgument +if "%1" == "no-LIBICONVPREFIX" goto NextArgument +if "%1" == "NO-LIBICONVPREFIX" goto NextArgument +if "%1" == "libintlprefix" goto _WithLibintlPrefix +if "%1" == "LIBINTLPREFIX" goto _WithLibintlPrefix +goto HTMLOption +:_WithLibintlPrefix +if "%1" == "libintlprefix" set LIBINTL_PREFIX=enabled +if "%1" == "LIBINTLPREFIX" set LIBINTL_PREFIX=enabled +if not "%LIBINTL_PREFIX%" == "enabled" goto SmallEnv +:HTMLOption +if "%1" == "withhtml" goto NextArgument +if "%1" == "withHTML" goto NextArgument +if "%1" == "WITHHTML" goto NextArgument +if "%1" == "withouthtml" goto _WithoutHTML +if "%1" == "withoutHTML" goto _WithoutHTML +if "%1" == "WITHOUTHTML" goto _WithoutHTML +goto SrcDirOption +:_WithoutHTML +if "%1" == "withouthtml" set HTML=disabled +if "%1" == "withoutHTML" set HTML=disabled +if "%1" == "WITHOUTHTML" set HTML=disabled +if not "%HTML%" == "disabled" goto SmallEnv +goto NextArgument +:SrcDirOption +echo %1 | grep -q "/" +if errorlevel 1 goto CollectArgument +set XSRC=%1 +if not "%XSRC%" == "%1" goto SmallEnv +goto NextArgument +:CollectArgument +set _ARGS=%ARGS% %1 +if not "%_ARGS%" == "%ARGS% %1" if not "%_ARGS%" == "%ARGS%%1" goto SmallEnv +echo %_ARGS% | grep -q "[^ ]" +if not errorlevel 0 set ARGS=%_ARGS% +set _ARGS= +:NextArgument +shift +if not "%1" == "" goto ArgLoop + +Rem Create an arguments file for the configure script. +echo --srcdir=%XSRC% > arguments +if "%CACHING%" == "enabled" echo --cache-file=%XSRC%/djgpp/config.cache >> arguments +if "%DEPENDENCY_TRACKING%" == "enabled" echo --enable-dependency-tracking >> arguments +if "%DEPENDENCY_TRACKING%" == "disabled" echo --disable-dependency-tracking >> arguments +if "%LIBICONV_PREFIX%" == "enabled" echo --with-libiconv-prefix >> arguments +if "%LIBICONV_PREFIX%" == "disabled" echo --without-libiconv-prefix >> arguments +if "%LIBINTL_PREFIX%" == "enabled" echo --with-libintl-prefix >> arguments +if "%LIBINTL_PREFIX%" == "disabled" echo --without-libintl-prefix >> arguments +if "%HTML%" == "enabled" echo --enable-html >> arguments +if "%HTML%" == "disabled" echo --disable-html >> arguments +if not "%ARGS%" == "" echo %ARGS% >> arguments +set ARGS= +set CACHING= +set DEPENDENCY_TRACKING= + +if "%XSRC%" == "." goto InPlace + +:NotInPlace +redir -e /dev/null update %XSRC%/configure.orig ./configure +test -f ./configure +if errorlevel 1 update %XSRC%/configure ./configure + +:InPlace +Rem Update configuration files +echo Updating configuration scripts... +test -f ./configure.orig +if errorlevel 1 update configure configure.orig +sed -f %XSRC%/djgpp/config.sed configure.orig > configure +if errorlevel 1 goto SedError + +Rem Make sure they have a config.site file +set CONFIG_SITE=%XSRC%/djgpp/config.site +if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv + +Rem Make sure crucial file names are not munged by unpacking +test -f %XSRC%/po/Makefile.in.in +if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in +test -f %XSRC%/po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/po/Makefile.in %XSRC%/po/Makefile.in-in +test -f %XSRC%/runtime-po/Makefile.in.in +if not errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in.in %XSRC%/runtime-po/Makefile.in-in +test -f %XSRC%/runtime-po/Makefile.in-in +if errorlevel 1 mv -f %XSRC%/runtime-po/Makefile.in %XSRC%/runtime-po/Makefile.in-in +test -f %XSRC%/data/c++.m4 +if not errorlevel 1 mv -f %XSRC%/data/c++.m4 %XSRC%/data/cxx.m4 +test -f %XSRC%/data/cxx.m4 +if errorlevel 1 mv -f %XSRC%/data/cpp.m4 %XSRC%/data/cxx.m4 + +Rem Fix data/lalr1.cc to reflect the renaming of c++.m4 +sed "s/c++\.m4/cxx.m4/" %XSRC%/data/lalr1.cc > lalr1.cc +if errorlevel 1 goto lalr1_ccFileError +mv ./lalr1.cc %XSRC%/data/lalr1.cc + +Rem Define DJGPP specific defs in config.hin +echo Editing config.hin... +test -f %XSRC%/config_h.orig +if errorlevel 1 update %XSRC%/config.hin %XSRC%/config_h.orig +sed -f %XSRC%/djgpp/config_h.sed %XSRC%/config_h.orig > config.hin +if errorlevel 1 goto SedError2 +mv -f config.hin %XSRC%/config.hin + + +Rem Fixing ilicit testsuite file name. +test -f %XSRC%/tests/c++.at +if not errorlevel 1 mv -f %XSRC%/tests/c++.at %XSRC%/tests/cxx.at + +Rem Fixing ilicit calc++ file names in the calc++ directory. +test -d %XSRC%/examples/calc++ +if not errorlevel 1 mv -f %XSRC%/examples/calc++ %XSRC%/examples/calcxx +test -d %XSRC%/examples/calcxx +if errorlevel 1 mv -f %XSRC%/examples/calcpp %XSRC%/examples/calcxx +test -f %XSRC%/examples/calcxx/calc++-scanner.cc +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc +test -f %XSRC%/examples/calcxx/calcxx-scanner.cc +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc +test -f %XSRC%/examples/calcxx/calc++-scanner.ll +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll +test -f %XSRC%/examples/calcxx/calcxx-scanner.ll +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll +test -f %XSRC%/examples/calcxx/calc++-driver.cc +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc +test -f %XSRC%/examples/calcxx/calcxx-driver.cc +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc +test -f %XSRC%/examples/calcxx/calc++-driver.hh +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh +test -f %XSRC%/examples/calcxx/calcxx-driver.hh +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh +test -f %XSRC%/examples/calcxx/calc++-parser.cc +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc +test -f %XSRC%/examples/calcxx/calcxx-parser.cc +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc +test -f %XSRC%/examples/calcxx/calc++-parser.hh +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh +test -f %XSRC%/examples/calcxx/calcxx-parser.hh +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh +test -f %XSRC%/examples/calcxx/calc++-parser.stamp +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp +test -f %XSRC%/examples/calcxx/calcxx-parser.stamp +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.stamp %XSRC%/examples/calcxx/calcxx-parser.stamp +test -f %XSRC%/examples/calcxx/calc++-parser.yy +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy +test -f %XSRC%/examples/calcxx/calcxx-parser.yy +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy +test -f %XSRC%/examples/calcxx/calc++.cc +if not errorlevel 1 mv -f %XSRC%/examples/calcxx/calc++.cc %XSRC%/examples/calcxx/calcxx.cc +test -f %XSRC%/examples/calcxx/calcxx.cc +if errorlevel 1 mv -f %XSRC%/examples/calcxx/calcpp.cc %XSRC%/examples/calcxx/calcxx.cc + +Rem Fixing #include lines in calcxx files. +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx.cc > calcxx.cc +if errorlevel 1 goto calcxxFileError +mv ./calcxx.cc %XSRC%/examples/calcxx/calcxx.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.cc > calcxx-driver.cc +if errorlevel 1 goto calcxxFileError +mv ./calcxx-driver.cc %XSRC%/examples/calcxx/calcxx-driver.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-driver.hh > calcxx-driver.hh +if errorlevel 1 goto calcxxFileError +mv ./calcxx-driver.hh %XSRC%/examples/calcxx/calcxx-driver.hh +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.cc > calcxx-parser.cc +if errorlevel 1 goto calcxxFileError +mv ./calcxx-parser.cc %XSRC%/examples/calcxx/calcxx-parser.cc +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.hh > calcxx-parser.hh +if errorlevel 1 goto calcxxFileError +mv ./calcxx-parser.hh %XSRC%/examples/calcxx/calcxx-parser.hh +:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-parser.yy > calcxx-parser.yy +:if errorlevel 1 goto calcxxFileError +:mv ./calcxx-parser.yy %XSRC%/examples/calcxx/calcxx-parser.yy +sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.cc > calcxx-scanner.cc +if errorlevel 1 goto calcxxFileError +mv ./calcxx-scanner.cc %XSRC%/examples/calcxx/calcxx-scanner.cc +:sed "/#[ ]*include/s/++/xx/" %XSRC%/examples/calcxx/calcxx-scanner.ll > calcxx-scanner.ll +:if errorlevel 1 goto calcxxFileError +:mv ./calcxx-scanner.ll %XSRC%/examples/calcxx/calcxx-scanner.ll +sed "s/calc++/calcxx/" %XSRC%/examples/calcxx/test > test +if errorlevel 1 goto calcxxFileError +mv ./test %XSRC%/examples/calcxx/test + + +Rem Fixing the scanner files to make file names 8.3 valid. +Rem Use only if you want to change the scan-gram.l and scan-skel.l files. +: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-gram.l > scan-gram.l +: if errorlevel 1 goto ScannerFileError +: mv ./scan-gram.l %XSRC%/src/scan-gram.l +: sed "/outfile=/s/\.yy/yy/" %XSRC%/src/scan-skel.l > scan-skel.l +: if errorlevel 1 goto ScannerFileError +: mv ./scan-skel.l %XSRC%/src/scan-skel.l + + +Rem This is required because DOS/Windows are case-insensitive +Rem to file names, and "make install" will do nothing if Make +Rem finds a file called `install'. +if exist INSTALL ren INSTALL INSTALL.txt + +Rem Set SHELL to a sane default or some configure tests stop working +Rem if the package is configured across partitions. +if not "%SHELL%" == "" goto HomeName +set SHELL=/bin/sh +if not "%SHELL%" == "/bin/sh" goto SmallEnv +echo No SHELL found in the environment, using default value + +:HomeName +Rem Set HOME to a sane default so configure stops complaining. +if not "%HOME%" == "" goto HostName +set HOME=%XSRC%/djgpp +if not "%HOME%" == "%XSRC%/djgpp" goto SmallEnv +echo No HOME found in the environment, using default value + +:HostName +Rem Set HOSTNAME so it shows in config.status +if not "%HOSTNAME%" == "" goto hostdone +if "%windir%" == "" goto msdos +set OS=MS-Windows +if not "%OS%" == "MS-Windows" goto SmallEnv +goto haveos +:msdos +set OS=MS-DOS +if not "%OS%" == "MS-DOS" goto SmallEnv +:haveos +if not "%USERNAME%" == "" goto haveuname +if not "%USER%" == "" goto haveuser +echo No USERNAME and no USER found in the environment, using default values +set HOSTNAME=Unknown PC +if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv +goto userdone +:haveuser +set HOSTNAME=%USER%'s PC +if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv +goto userdone +:haveuname +set HOSTNAME=%USERNAME%'s PC +if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv +:userdone +set _HOSTNAME=%HOSTNAME%, %OS% +if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv +set HOSTNAME=%_HOSTNAME% +:hostdone +set _HOSTNAME= +set OS= + +Rem install-sh is required by the configure script but clashes with the +Rem various Makefile install-foo targets, so we MUST have it before the +Rem script runs and rename it afterwards +test -f %XSRC%/install-sh +if not errorlevel 1 goto NoRen0 +test -f %XSRC%/install-sh.sh +if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh +:NoRen0 + +if "%NLS%" == "disabled" goto WithoutNLS + +:WithNLS +Rem Check for the needed libraries and binaries. +test -x /dev/env/DJDIR/bin/msgfmt.exe +if errorlevel 1 goto MissingNLSTools +test -x /dev/env/DJDIR/bin/xgettext.exe +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/include/libcharset.h +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/lib/libcharset.a +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/include/iconv.h +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/lib/libiconv.a +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/include/libintl.h +if errorlevel 1 goto MissingNLSTools +test -f /dev/env/DJDIR/lib/libintl.a +if errorlevel 1 goto MissingNLSTools + +Rem Recreate the files in the %XSRC%/po subdir with our ported tools. +redir -e /dev/null rm %XSRC%/po/*.gmo +redir -e /dev/null rm %XSRC%/po/bison.pot +redir -e /dev/null rm %XSRC%/po/cat-id-tbl.c +redir -e /dev/null rm %XSRC%/po/stamp-cat-id + +Rem Update the arguments file for the configure script. +Rem We prefer without-included-gettext because libintl.a from gettext package +Rem is the only one that is garanteed to have been ported to DJGPP. +echo --enable-nls --without-included-gettext >> arguments +goto ConfigurePackage + +:MissingNLSTools +echo Needed libs/tools for NLS not found. Configuring without NLS. +:WithoutNLS +Rem Update the arguments file for the configure script. +echo --disable-nls >> arguments + +:ConfigurePackage +echo Running the ./configure script... +sh ./configure @arguments +if errorlevel 1 goto CfgError +rm arguments +echo Done. +goto End + +:lalr1_ccFileError +echo ./data/lalr1.cc file editing failed! +goto End + +:calcxxFileError +echo ./examples/calcxx file editing failed! +goto End + +:ScannerFileError +echo ./scanner file editing failed! +goto End + +:SedError +echo ./configure script editing failed! +goto End + +:SedError2 +echo ./config.hin editing failed! +goto End + +:CfgError +echo ./configure script exited abnormally! +goto End + +:SmallEnv +echo Your environment size is too small. Enlarge it and run me again. +echo Configuration NOT done! + +:End +test -f %XSRC%/install-sh.sh +if not errorlevel 1 goto NoRen1 +test -f %XSRC%/install-sh +if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh +:NoRen1 +if "%SHELL%" == "/bin/sh" set SHELL= +if "%HOME%" == "%XSRC%/djgpp" set HOME= +set ARGS= +set CONFIG_SITE= +set HOSTNAME= +set NLS= +set CACHING= +set DEPENDENCY_TRACKING= +set XSRC= diff --git a/djgpp/config.sed b/djgpp/config.sed new file mode 100644 index 00000000..58316fe5 --- /dev/null +++ b/djgpp/config.sed @@ -0,0 +1,141 @@ +# Additional editing of Makefiles +/(echo[ ]*':t/ a\ +# DJGPP specific Makefile changes.\ + /^aliaspath * *=/s,:,";",g;t t\ + /TEXINPUTS=/s,:,";",g;t t\ + /PATH=/s,:,";",g;t t\ + s,\\.deps,_deps,g;t t\ + s,\\.new\\.,_new.,g;t t\ + s,\\.old\\.,_old.,g;t t\ + s,c++\\.at,cxx.at,g;t t\ + s,c++\\.m4,cxx.m4,g;t t\ + s,calc++,calcxx,g;t t\ + s,Makefile\\.in\\.in,Makefile.in-in,g;t t\ + s,Makefile\\.am\\.in,Makefile.am-in,g;t t\ + s,(MAKEINFOFLAGS),& --no-split,\ + /^install-info-am:/,/^$/ {\ + /@list=/ s,\\\$(INFO_DEPS),& bison.i,\ + /@for *file/ s,\\\$(INFO_DEPS),& bison.i,\ + s,file-\\[0-9\\]\\[0-9\\],& \\$\\$file[0-9] \\$\\$file[0-9][0-9],\ + }\ + /^\\.y\\.c:/,/^$/ {\ + /\\\$(YACCCOMPILE)/ {\ + a\\\ + -@test -f y.tab.c && mv -f y.tab.c y_tab.c\\\ + -@test -f y.tab.h && mv -f y.tab.h y_tab.h\ + }\ + }\ +/^libbison.a:/ i\\\ +\\$(top_srcdir)/djgpp/subpipe.c: \\$(top_srcdir)/djgpp/subpipe.h\\\ +subpipe.o: \\$(top_srcdir)/djgpp/subpipe.c \\$(top_srcdir)/djgpp/subpipe.h\\\ + \\$(COMPILE) -c \\$<\ +/^yacc:/ i\\\ +yacc.bat:\\\ + echo "bison\\$(EXEEXT) -y %1 %2 %3 %4 %5 %6 %7 %8 %9" >\\$@\ +/^bin_SCRIPTS =/s/$/ yacc.bat/\ +/^MOSTLYCLEANFILES = yacc/s/$/ yacc.bat/ + + +# Makefile.in.in is renamed to Makefile.in-in. +/ac_config_files=/,/_ACEOF/ { + s|po/Makefile\.in|&:po/Makefile.in-in| +} +/CONFIG_FILES=/ s|po/Makefile\.in|&:po/Makefile.in-in|2 + +# We always use _deps and _libs instead of .deps and .libs, because +# the latter is an invalid name on 8+3 MS-DOS filesystem. This makes +# the generated Makefiles good for every DJGPP installation, not only +# the one where the package was configured (which could happen to be +# a Windows box, where leading dots in file names are allowed). +s,\.deps,_deps,g +s,\.libs,_libs,g +/^rmdir[ ]*\.tst/ i\ +am__leading_dot=_ + +# Replace (command) > /dev/null with `command > /dev/null`, since +# parenthesized commands always return zero status in the ported Bash, +# even if the named command doesn't exist +/if ([^|;`]*null/{ + s,(,`, + s,),, + /null[ ]*2>&1/ s,2>&1,&`, + /null.*null/ s,null.*null,&`, + /null.*null/ !{ + /null[ ]*2>&1/ !s,null,&`, + } +} + +# DOS-style absolute file names should be supported as well +/\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*, + +# Prevent the spliting of subs.sed. +# The sed script: subs.sed is split into 48 lines long files. +# This will produce sed scripts called subs-$ac_sed_frag.sed, where +# $ac_sed_frag is some unique number. This will not work if the splited +# sed script contains a multiple line sed command at line #48. In this +# case the first part of the multiple line sed command will be written +# at the end of one particular subs-$ac_sed_frag.sed and the rest of the +# sed command will be written at the begining of the next subs-$ac_sed_frag.sed +# making both sed script useless. +# This matches the configure script produced by Autoconf 2.57 +/ac_max_sed_lines=[0-9]/ s,=.*$,=`sed -n "$=" $tmp/subs.sed`, + +# The following two items are changes needed for configuring +# and compiling across partitions. +# 1) The given srcdir value is always translated from the +# "x:" syntax into "/dev/x" syntax while we run configure. +/^[ ]*-srcdir=\*.*$/ a\ + ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"` +/set X `ls -Lt \$srcdir/ i\ + if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\ + srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\ + fi + +# Autoconf 2.52e generated configure scripts +# write absolute paths into Makefiles and bison.in +# making them useless for DJGPP installations for +# which the package has not been configured for. +/MISSING=/,/^$/ { + /^fi$/ a\ +am_missing_run=`echo "$am_missing_run" | sed 's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'` +} +/^install_sh=/a\ +install_sh=`echo "$install_sh" | sed 's%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*%${top_srcdir}%'` + +# This will only work if the assumption that the +# testsuite is ran from the following path: +# ${top_srcdir}/tests/testsuite.dir +# holds. The explicit names are of no importance. +# ../../. == ${top_srcdir} +/\.)[ ]*ac_abs_builddir=/,/^esac$/ { + /^esac$/ a\ +ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"` +} +/\.)[ ]*ac_abs_top_builddir=/,/^esac$/ { + /^esac$/ a\ +ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"` +} +/\.)[ ]*ac_abs_srcdir=/,/^esac$/ { + /^esac$/ a\ +ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../.%"` +} +/\.)[ ]*ac_abs_top_srcdir=/,/^esac$/ { + /^esac$/ a\ +ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%;s%.:.*/bison-[0-9]\\{1,1\\}[-.0-9A-z]*/[^/]*%../../../%"` +} + +# Add DJGPP version information. +/^#define VERSION/ s/\$VERSION/& (DJGPP port (r1))/ + +# We need makeinfo to make the html formated docs. +/\$am_missing_run[ ]*makeinfo/ s,\$am_missing_run,, + +# The path to the FORTRAN compiler and libraries +# shall contain no absolute path reference so it +# will be good for all djgpp installations. +/^FLIBS="\$ac_cv_flibs"/ i\ +ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\ +ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"` + +# The following is not a valid DOS file name +s/calc++/calcxx/g \ No newline at end of file diff --git a/djgpp/config.site b/djgpp/config.site new file mode 100644 index 00000000..ebbd2bb8 --- /dev/null +++ b/djgpp/config.site @@ -0,0 +1,56 @@ +#! /bin/sh + +# This is the config.site file for configuring GNU packages +# which are to be built with DJGPP tools. + +# Include the djgpp subdirectory in PATH, so that getconf is found +PATH="$srcdir/djgpp;$PATH" + +# These two variables are required, otherwise looking for +# programs along the PATH will not work. +PATH_SEPARATOR=: +PATH_EXPAND=y + +# This is required in for "test -f foo" to find foo.exe +export TEST_FINDS_EXE=y + +# The root of the DJGPP tree serves as the default prefix +test "x$prefix" = xNONE && prefix='/dev/env/DJDIR' + +# This is required for config.status script to be run, since +# ./configure runs it by invoking ${CONFIG_SHELL-/bin/sh} +CONFIG_SHELL=${CONFIG_SHELL='sh'} + +# A sane defualt for emacs. +ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'} + +# These are set here so the generated Makefile's will be good +# for every DJGPP installation, not only the one where the +# package was configured. +# $INSTALL must be an absolute path name, otherwise config.status +# will try to prepend ./ and ../ to it when it goes into subdirs. +INSTALL=${INSTALL='/dev/env/DJDIR/bin/ginstall -c'} +RANLIB=${RANLIB='ranlib'} +GMSGFMT=${GMSGFMT='/dev/env/DJDIR/bin/msgfmt'} +MSGFMT=${MSGFMT='/dev/env/DJDIR/bin/msgfmt'} +XGETTEXT=${XGETTEXT='/dev/env/DJDIR/bin/xgettext'} + +# A sane default for emacs. +ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'} + +# A sane default for m4. +ac_cv_path_M4=${M4='/dev/env/DJDIR/bin/m4'} + +# These are set here so the generated libtool will be good +# for every DJGPP installation, not only the one where the +# package was configured. +NM=${NM='nm'} +LD=${LD='ld'} + +# Force the test for 'ln -s' to report 'cp -pf'. +ac_cv_prog_LN_S='cp -pf' + +# There is no fork and vfork functionality. +ac_cv_func_fork=no +ac_cv_func_vfork=no +ac_cv_func_pipe=no diff --git a/djgpp/config_h.sed b/djgpp/config_h.sed new file mode 100644 index 00000000..89184925 --- /dev/null +++ b/djgpp/config_h.sed @@ -0,0 +1,15 @@ +# sed script for DJGPP specific editing of config.hin + +$ a\ +\ +\ +/* DJGPP specific defines. */\ +\ +#include \ +#define TAB_EXT ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".tab" : "_tab")\ +#define OUTPUT_EXT ((pathconf(NULL, _PC_NAME_MAX) > 12) ? ".output" : ".out")\ +\ +#define DEFAULT_TMPDIR "/dev/env/DJDIR/tmp" + + + -- 2.47.2