diff --git a/MTA10_Server/mods/deathmatch/logic/CGame.cpp b/MTA10_Server/mods/deathmatch/logic/CGame.cpp index 5dadb619fe..8eee30fd50 100644 --- a/MTA10_Server/mods/deathmatch/logic/CGame.cpp +++ b/MTA10_Server/mods/deathmatch/logic/CGame.cpp @@ -530,6 +530,15 @@ bool CGame::Start ( int iArgumentCount, char* szArguments [] ) return false; } + // Check pcre has been built correctly + int iPcreConfigUtf8 = 0; + pcre_config( PCRE_CONFIG_UTF8, &iPcreConfigUtf8 ); + if ( iPcreConfigUtf8 == 0 ) + { + CLogger::ErrorPrintf( "PCRE built without UTF8 support\n" ); + return false; + } + // Grab the path to the main config SString strBuffer; const char* szMainConfig; diff --git a/initial-install.sh b/initial-install.sh index 85f5192bc9..52e26b6e2b 100755 --- a/initial-install.sh +++ b/initial-install.sh @@ -13,17 +13,16 @@ autoreconf -fiv # then look at the configure options: # ./configure --help - -# on a 64bit system, while there's no 64bit net.so -# and probably some unknown issues you should compile and link -# 32bit objects like so: -#export PKG_CONFIG_PATH=/usr/lib32/pkgconfig -#./configure LDFLAGS="-m32" CPPFLAGS="-m32" CFLAGS="-m32" CXXFLAGS="-m32" --enable-silent-rules $@ - if [ $1 = "-g" ]; then - ./configure CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' --with-pic --disable-system-pcre + ./configure --with-pic --disable-system-pcre --enable-utf8 \ + CFLAGS='-g -O2 -fPIC -DPIC' \ + CXXFLAGS='-g -O2 -fPIC -DPIC -std=gnu++0x' \ + CPPFLAGS='-g -O2 -fPIC -DPIC' else - ./configure CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' --with-pic --disable-system-pcre + ./configure --with-pic --disable-system-pcre --enable-utf8 \ + CFLAGS='-O2 -fPIC -DPIC' \ + CXXFLAGS='-O2 -fPIC -DPIC -std=gnu++0x' \ + CPPFLAGS='-O2 -fPIC -DPIC' fi # Remove previous build files #2 @@ -43,8 +42,14 @@ cd ../.. # then you have makefiles and the source can be compiled :) # building in parallel mode (use -j) if [ $1 = "-g" ]; then - make CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' >_make.log + make \ + CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' \ + CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized -std=gnu++0x' \ + CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' >_make.log else - make CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' >_make.log + make \ + CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' \ + CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized -std=gnu++0x' \ + CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' >_make.log fi diff --git a/vendor/pcre/shipped_for_mta_win32/config.h b/vendor/pcre/shipped_for_mta_win32/config.h index dadfbaf08f..b10d9396b1 100644 --- a/vendor/pcre/shipped_for_mta_win32/config.h +++ b/vendor/pcre/shipped_for_mta_win32/config.h @@ -300,7 +300,7 @@ them both to 0; an emulation function will be used. */ even in an EBCDIC environment, but it is incompatible with the EBCDIC macro. That is, PCRE can support *either* EBCDIC code *or* ASCII/UTF-8, but not both at once. */ -/* #undef SUPPORT_UTF8 */ +#define SUPPORT_UTF8 /* Version number of package */ #ifndef VERSION