Changeset - r16460:4fc43945af22
[Not reviewed]
master
0 1 0
terkhen - 14 years ago 2010-11-14 20:47:45
terkhen@openttd.org
(svn r21194) -Add: Configure option for compiling OpenTTD as a console application under MinGW.
1 file changed with 29 insertions and 1 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -55,6 +55,7 @@ set_default() {
 
	enable_static="1"
 
	enable_translator="0"
 
	enable_unicode="1"
 
	enable_console="1";
 
	enable_assert="1"
 
	enable_strip="0"
 
	enable_universal="1"
 
@@ -128,6 +129,7 @@ set_default() {
 
		enable_static
 
		enable_translator
 
		enable_unicode
 
		enable_console
 
		enable_assert
 
		enable_strip
 
		enable_universal
 
@@ -305,6 +307,9 @@ detect_params() {
 
			--disable-unicode)            enable_unicode="0";;
 
			--enable-unicode)             enable_unicode="2";;
 
			--enable-unicode=*)           enable_unicode="$optarg";;
 
			--disable-console)            enable_console="0";;
 
			--enable-console)             enable_console="2";;
 
			--enable-console=*)           enable_console="$optarg";;
 

	
 
			--disable-cocoa-quartz)       enable_cocoa_quartz="0";;
 
			--enable-cocoa-quartz)        enable_cocoa_quartz="2";;
 
@@ -718,6 +723,20 @@ check_params() {
 
		fi
 
	fi
 

	
 
	if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ]; then
 
		log 1 "checking console application... not Windows, skipping"
 
	elif [ "$enable_console" = "1" ] && [ "$enable_dedicated" != "0" ]; then
 
		log 1 "checking console application... dedicated server, enabled"
 
		enable_console="2"
 
	elif [ "$enable_console" = "1" ]; then
 
		log 1 "checking console application... disabled (only used when forced)"
 
		enable_console="0"
 
	elif [ "$enable_console" = "0" ]; then
 
		log 1 "checking console application... disabled"
 
	else
 
		log 1 "checking console application... enabled"
 
	fi
 

	
 
	if [ "$enable_network" = "1" ] && [ "$os" = "DOS" ]; then
 
		log 1 "checking network... DOS, skipping"
 
		enable_network=0
 
@@ -1334,7 +1353,13 @@ make_cflags_and_ldflags() {
 
		fi
 
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ]; then
 
			flags="$flags -mno-cygwin"
 
			LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,windows"
 

	
 
			if [ "$enable_console" != "0" ]; then
 
				LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,console"
 
			else
 
				LDFLAGS="$LDFLAGS -mno-cygwin -Wl,--subsystem,windows"
 
			fi
 

	
 
			LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
 

	
 
			if [ $cc_version -ge 44 ]; then
 
@@ -3298,6 +3323,9 @@ showhelp() {
 
	echo "  --disable-cocoa-quickdraw      disable the quickdraw window mode driver for Cocoa (OSX ONLY)"
 
	echo "  --disable-unicode              disable unicode support to build win9x"
 
	echo "                                 version (Win32 ONLY)"
 
	echo "  --enable-console               compile as a console application instead of as a GUI application."
 
	echo "                                 If this setting is active, debug output will appear in the same"
 
	echo "                                 console instead of opening a new window. (Win32 ONLY)"
 
	echo "  --disable-network              disable network support"
 
	echo "  --disable-assert               disable asserts (continue on errors)"
 
	echo "  --enable-strip                 enable any possible stripping"
0 comments (0 inline, 0 general)