Changeset - r10059:0d96c1f4d2a8
[Not reviewed]
master
0 2 0
truebrain - 16 years ago 2008-09-02 15:59:21
truebrain@openttd.org
(svn r14226) -Revert r13792: 'configure --help' failed when for example gcc wasn't detected .. not really what you expect. By the lack of imagination, a revert will have to do for now.
2 files changed with 10 insertions and 18 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -140,25 +140,25 @@ detect_params() {
 
	# Walk over all params from the user and override any default settings if
 
	#  needed. This also handles any invalid option.
 
	for p in "$@"; do
 
		if [ -n "$prev_p" ]; then
 
			eval "$prev_p=\$p"
 
			prev_p=
 
			continue
 
		fi
 

	
 
		optarg=`expr "x$p" : 'x[^=]*=\(.*\)'`
 

	
 
		case "$p" in
 
			--help | -h)                  SHOW_HELP="1";;
 
			--help | -h)                  showhelp; exit 0;;
 

	
 
			--config-log)                 prev_p="config_log";;
 
			--config-log=*)               config_log="$optarg";;
 

	
 
			--build)                      prev_p="build";;
 
			--build=*)                    build="$optarg";;
 

	
 
			--host)                       prev_p="host";;
 
			--host=*)                     host="$optarg";;
 

	
 
			--os)                         prev_p="os";;
 
			--os=*)                       os="$optarg";;
 
@@ -2457,60 +2457,60 @@ showhelp() {
 
	echo ""
 
	echo "Configuration:"
 
	echo "  -h, --help                     display this help and exit"
 
	echo ""
 
	echo "System types:"
 
	echo "  --build=BUILD                  configure for building on BUILD [guessed]"
 
	echo "  --host=HOST                    cross-compile to build programs to run"
 
	echo "                                 on HOST [BUILD]"
 
	echo "  --windres=WINDRES              the windres to use [HOST-windres]"
 
	echo "  --strip=STRIP                  the strip to use [HOST-strip]"
 
	echo "  --awk=AWK                      the awk to use in configure [awk]"
 
	echo "  --lipo=LIPO                    the lipo to use (OSX ONLY) [HOST-lipo]"
 
	echo "  --os=OS                        the OS we are compiling for [$os]"
 
	echo "  --os=OS                        the OS we are compiling for [DETECT]"
 
	echo "                                 DETECT/UNIX/OSX/FREEBSD/OPENBSD/NETBSD/"
 
	echo "                                 MORPHOS/HPUX/BEOS/SUNOS/CYGWIN/MINGW/OS2/"
 
	echo "                                 WINCE/PSP"
 
	echo "  --endian=ENDIAN                set the endian of the HOST (AUTO/LE/BE)"
 
	echo "  --revision=rXXXX               overwrite the revision detection."
 
	echo "                                 Use with care!"
 
	echo ""
 
	echo "Paths:"
 
	echo "  --prefix-dir=dir               specifies the prefix for all installed"
 
	echo "                                 files [$prefix_dir]"
 
	echo "                                 files [/usr/local]"
 
	echo "  --binary-dir=dir               location of the binary. Will be prefixed"
 
	echo "                                 with the prefix-dir [$binary_dir]"
 
	echo "                                 with the prefix-dir [games]"
 
	echo "  --data-dir=dir                 location of data files (lang, data, gm)."
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$data_dir]"
 
	echo "                                 [share/games/openttd]"
 
	echo "  --doc-dir=dir                  location of the doc files"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$doc_dir]"
 
	echo "  --icon-dir=dir                 location of icons. Will be prefixed"
 
	echo "                                 with the prefix-dir [$icon_dir]"
 
	echo "                                 with the prefix-dir [share/pixmaps]"
 
	echo "  --icon-theme-dir=dir           location of icon theme."
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 and postfixed with size-dirs [$icon_theme_dir]"
 
	echo "  --man-dir=dir                  location of the manual page (UNIX only)"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$man_dir]"
 
	echo "  --menu-dir=dir                 location of the menu item. (UNIX only, except OSX)"
 
	echo "                                 Will be prefixed with the prefix-dir"
 
	echo "                                 [$menu_dir]"
 
	echo "                                 [share/applications]"
 
	echo "  --personal-dir=dir             location of the personal directory"
 
	echo "                                 [$personal_dir]"
 
	echo "                                 [os-dependent default]"
 
	echo "  --shared-dir=dir               location of shared data files"
 
	echo "                                 [$shared_dir]"
 
	echo "                                 [os-dependent default]"
 
	echo "  --install-dir=dir              specifies the root to install to."
 
	echo "                                 Useful to install into jails [$install_dir]"
 
	echo "                                 Useful to install into jails [/]"
 
	echo ""
 
	echo "Features and packages:"
 
	echo "  --enable-debug[=LVL]           enable debug-mode (LVL=[0123], 0 is release)"
 
	echo "  --enable-desync-debug=[LVL]    enable desync debug options (LVL=[012], 0 is none"
 
	echo "  --enable-profiling             enables profiling"
 
	echo "  --enable-dedicated             compile a dedicated server (without video)"
 
	echo "  --enable-static                enable static compile (doesn't work for"
 
	echo "                                 all HOSTs)"
 
	echo "  --enable-translator            enable extra output for translators"
 
	echo "  --enable-universal             enable universal builds (OSX ONLY)"
 
	echo "  --enable-osx-g5                enables optimizations for G5 (OSX ONLY)"
 
	echo "  --disable-cocoa-quartz         disable the quartz window mode driver for Cocoa (OSX ONLY)"
configure
Show inline comments
 
@@ -34,35 +34,27 @@ SOURCE_LIST="$ROOT_DIR/source.list"
 
if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
 
	if [ ! -f "config.cache" ]; then
 
		echo "can't reconfigure, because never configured before"
 
		exit 1
 
	fi
 
	# Make sure we don't lock config.cache
 
	cat config.cache | sed 's/\\ /\\\\ /g' > cache.tmp
 
	sh cache.tmp
 
	rm -f cache.tmp
 
	exit $?
 
fi
 

	
 
# 'export SHOW_HELP="0"' doesn't work on some systems
 
SHOW_HELP="0"
 
export SHOW_HELP
 

	
 
set_default
 
detect_params "$@"
 
check_params
 
if [ "$SHOW_HELP" != "0" ]; then
 
	showhelp
 
	exit 0
 
fi
 
save_params
 
make_cflags_and_ldflags
 

	
 
EXE=""
 
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "WINCE" ]; then
 
	EXE=".exe"
 
fi
 

	
 
TTD="openttd$EXE"
 
STRGEN="strgen$EXE"
 
ENDIAN_CHECK="endian_check$EXE"
 

	
0 comments (0 inline, 0 general)