📄 config.bat
字号:
@echo offecho Configuring GNU libcharset for DJGPP v2.x...Rem The SmallEnv tests protect against fixed and too small sizeRem of the environment in stock DOS shell.Rem Find out where the sources areset XSRC=.if not "%XSRC%" == "." goto SmallEnvif "%1" == "" goto InPlaceset XSRC=%1if not "%XSRC%" == "%1" goto SmallEnvredir -e /dev/null update %XSRC%/configure.orig ./configuretest -f ./configureif errorlevel 1 update %XSRC%/configure ./configure:InPlaceRem Update configuration filesecho Updating configuration scripts...test -f ./configure.origif errorlevel 1 update ./configure ./configure.origsed -f %XSRC%/djgpp/config.sed ./configure.orig > configureif errorlevel 1 goto SedErrorRem Make sure they have a config.site fileset CONFIG_SITE=%XSRC%/djgpp/config.siteif not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnvRem Make sure crucial file names are not munged by unpackingtest -f %XSRC%/config.h.inif not errorlevel 1 mv -f %XSRC%/config.h.in %XSRC%/config.h-intest -f %XSRC%/include/libcharset.h.inif not errorlevel 1 mv -f %XSRC%/include/libcharset.h.in %XSRC%/include/libcharset.h-inRem This is required because DOS/Windows are case-insensitiveRem to file names, and "make install" will do nothing if MakeRem finds a file called `install'.if exist INSTALL mv -f INSTALL INSTALL.txtRem install-sh is required by the configure script but clashes with theRem various Makefile install-foo targets, so we MUST have it before theRem script runs and rename it afterwardstest -f %XSRC%/install-shif not errorlevel 1 goto NoRen0test -f %XSRC%/install-sh.shif not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh:NoRen0Rem Set HOSTNAME so it shows in config.statusif not "%HOSTNAME%" == "" goto hostdoneif "%windir%" == "" goto msdosset OS=MS-Windowsif not "%OS%" == "MS-Windows" goto SmallEnvgoto haveos:msdosset OS=MS-DOSif not "%OS%" == "MS-DOS" goto SmallEnv:haveosif not "%USERNAME%" == "" goto haveunameif not "%USER%" == "" goto haveuserecho No USERNAME and no USER found in the environment, using default valuesset HOSTNAME=Unknown PCif not "%HOSTNAME%" == "Unknown PC" goto SmallEnvgoto userdone:haveuserset HOSTNAME=%USER%'s PCif not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnvgoto userdone:haveunameset HOSTNAME=%USERNAME%'s PCif not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv:userdoneset _HOSTNAME=%HOSTNAME%, %OS%if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnvset HOSTNAME=%_HOSTNAME%:hostdoneset _HOSTNAME=set OS=Rem With libtool 1.4 -fPIC is the default. This completely breaks compilationsRem with djgpp, so we will always use --disable-shared to inhibit the usage ofRem -fPIC and -DPIC flags in libtool.echo Running the ./configure script...sh ./configure --enable-static --disable-shared --src=%XSRC%if errorlevel 1 goto CfgErrorecho Done.goto End:SedErrorecho ./configure script editing failed!goto End:CfgErrorecho ./configure script exited abnormally!goto End:SmallEnvecho Your environment size is too small. Enlarge it and run me again.echo Configuration NOT done!:Endtest -f %XSRC%/install-sh.shif not errorlevel 1 goto NoRen1test -f %XSRC%/install-shif not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh:NoRen1set CONFIG_SITE=set HOSTNAME=set XSRC=
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -