summaryrefslogtreecommitdiff
path: root/games/uqm/files/patch-build::unix::build.config
blob: b1b7ee165ff0e9e0f768f3d625429c7c6851ee13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
--- build/unix/build.config.orig	Sat Sep  6 17:08:49 2003
+++ build/unix/build.config	Sun Sep 14 06:19:47 2003
@@ -2,7 +2,6 @@
 
 # Include build functions used here
 . build/unix/config_functions
-. build/unix/menu_functions
 . build/unix/ansi
 
 
@@ -37,168 +36,24 @@
 define_have_header getopt.h
 
 
-# Describe the menu:
-MENU_main_ITEMS="debug graphics sound ioformat install_path"
-MENU_main_TITLE="Main menu"
-MENU_main_ITEM_debug_TYPE=CHOICE
-MENU_main_ITEM_graphics_TYPE=CHOICE
-MENU_main_ITEM_sound_TYPE=CHOICE
-MENU_main_ITEM_ioformat_TYPE=CHOICE
-MENU_main_ITEM_link_TYPE=CHOICE
-MENU_main_ITEM_install_path_TYPE=MENU
-
-CHOICE_debug_OPTIONS="nodebug debug strictdebug"
-CHOICE_debug_TITLE="Include debugging information"
-CHOICE_debug_OPTION_nodebug_TITLE="No debugging information"
-CHOICE_debug_OPTION_nodebug_ACTION='nodebug_action'
-nodebug_action() {
-	CFLAGS="$CFLAGS -O3"
-	DEBUG=0
-}
-CHOICE_debug_OPTION_debug_TITLE="Debugging information"
-CHOICE_debug_OPTION_debug_ACTION='debug_action'
-debug_action() {
-	CFLAGS="$CFLAGS -g -O0 -W -Wall"
-	CFLAGS="$CFLAGS -DDEBUG_TRACK_SEM" # enable semaphore deugging
-	LDFLAGS="$LDFLAGS -O0"
-	DEBUG=1
-}
-CHOICE_debug_OPTION_strictdebug_TITLE="Debug info + strict compile checks"
-CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action'
-strictdebug_action() {
-	CFLAGS="$CFLAGS -O1"  # This is needed for -Wunitialized
-	CFLAGS="$CFLAGS -DDEBUG_TRACK_SEM" # enable semaphore debugging
-	CFLAGS="$CFLAGS -W -Wall \
-			-Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
-			-Wstrict-prototypes -Wmissing-declarations \
-			-Wwrite-strings -Wimplicit -Wreturn-type -Wformat \
-			-Wswitch -Wcomment -Wchar-subscripts \
-			-Wparentheses -Wcast-align -Waggregate-return \
-			-Winline -Wuninitialized"
-#	CFLAGS="$CFLAGS "-Wpointer-arith"
-			# Some standard header won't even compile with this on
-#	CFLAGS="$CFLAGS -Wshadow"
-			# This gives absurd conflicts with standard files,
-			# like from 'y2'
-#	CFLAGS="$CFLAGS -Werror"
-			# We shouldn't do this until we actually nail them
-			# all in the original code.  Then we can enforce them
-			# on ourselves.
-#       CFLAGS="$CFLAGS -pedantic-errors -ansi -trigraphs"  # ANSI
-#	CFLAGS="$CFLAGS -Wnested-externs"
-			# We know they're in the code, and though we'd like to get
-			# rid of them, they're not bugs.
-	CFLAGS=`echo $CFLAGS`
-			# Remove all the unnecessary spaces from $CFLAGS,
-			# for more readable messages.
-	DEBUG=0
-}
-CHOICE_debug_DEFAULT=debug
-
-CHOICE_graphics_OPTIONS="pure opengl"
-CHOICE_graphics_TITLE="OpenGL graphics support"
-CHOICE_graphics_OPTION_pure_TITLE="Don't include OpenGL graphics support"
-CHOICE_graphics_OPTION_pure_ACTION='graphics_pure_action'
-graphics_pure_action() {
-	CFLAGS="$CFLAGS -DGFXMODULE_SDL"
-	HAVE_OPENGL=0
-}
-CHOICE_graphics_OPTION_opengl_TITLE="Include OpenGL graphics support"
-CHOICE_graphics_OPTION_opengl_ACTION='graphics_opengl_action'
-CHOICE_graphics_OPTION_opengl_PRECOND="have_library opengl"
-graphics_opengl_action() {
-	CFLAGS="$CFLAGS -DGFXMODULE_SDL -DHAVE_OPENGL"
-	HAVE_OPENGL=1
-	use_library opengl
-}
-CHOICE_graphics_DEFAULT=opengl
-
-CHOICE_sound_OPTIONS="mixsdl openal"
-CHOICE_sound_TITLE="Sound backend"
-CHOICE_sound_OPTION_mixsdl_TITLE="Use MixSDL for sound (internal)"
-CHOICE_sound_OPTION_mixsdl_ACTION=sound_mixsdl_action
-sound_mixsdl_action() {
-	CFLAGS="$CFLAGS -DSOUNDMODULE_SDL"
-	SOUNDMODULE=mixsdl
-	use_library vorbisfile
-#	use_library vorbis
-}
-CHOICE_sound_OPTION_openal_TITLE="Include OpenAL support (experimental)"
-CHOICE_sound_OPTION_openal_PRECOND="have_library openal"
-CHOICE_sound_OPTION_openal_ACTION=sound_openal_action
-sound_openal_action() {
-	CFLAGS="$CFLAGS -DHAVE_OPENAL -DSOUNDMODULE_SDL"
-	SOUNDMODULE=openal
-	use_library openal
-	use_library vorbisfile
-#	use_library vorbis
-}
-CHOICE_sound_DEFAULT=mixsdl
-
-CHOICE_ioformat_OPTIONS="stdio stdio_zip"
-CHOICE_ioformat_TITLE="Supported file i/o methods"
-CHOICE_ioformat_OPTION_stdio_TITLE="Only direct file i/o"
-CHOICE_ioformat_OPTION_stdio_zip_TITLE="Direct & .zip file i/o"
-CHOICE_ioformat_OPTION_stdio_zip_PRECOND="have_library zlib"
-CHOICE_ioformat_OPTION_stdio_zip_ACTION="ioformat_stdio_zip_action"
-ioformat_stdio_zip_action() {
-	CFLAGS="$CFLAGS -DHAVE_ZIP=1"
-	USE_ZIP_IO=1
-	use_library zlib
-}
-CHOICE_ioformat_DEFAULT=stdio_zip
-
-# Making static binaries is more complicated than this.
-# For now, it will have to be done by hand.
-#CHOICE_link_OPTIONS="static dynamic"
-#CHOICE_link_TITLE="Linking"
-#CHOICE_link_OPTION_static_TITLE="Statically linked libraries"
-#CHOICE_link_OPTION_static_ACTION='eval LDFLAGS="$LDFLAGS -static"'
-#CHOICE_link_OPTION_dynamic_TITLE="Dynamically linked libraries"
-#CHOICE_link_DEFAULT=dynamic
-
-MENU_install_path_ITEMS="install_prefix install_bindir install_libdir \
-		install_sharedir"
-MENU_install_path_TITLE="Installation paths"
-MENU_install_path_ITEM_install_prefix_TYPE=INPUT
-MENU_install_path_ITEM_install_bindir_TYPE=INPUT
-MENU_install_path_ITEM_install_libdir_TYPE=INPUT
-MENU_install_path_ITEM_install_sharedir_TYPE=INPUT
-
-INPUT_install_prefix_DEFAULT="/usr/local/games"
-INPUT_install_prefix_TITLE="Installation prefix"
-INPUT_install_prefix_VALIDATOR=validate_path
-INPUT_install_prefix_ACTION='eval INSTALL_PREFIX=$MENU_install_prefix_VALUE'
-
-INPUT_install_bindir_DEFAULT='$prefix/bin'
-INPUT_install_bindir_TITLE="Location for binaries"
-INPUT_install_bindir_VALIDATOR=validate_path
-
-INPUT_install_libdir_DEFAULT='$prefix/lib'
-INPUT_install_libdir_TITLE="Location for non-sharable data"
-INPUT_install_libdir_VALIDATOR=validate_path
-
-INPUT_install_sharedir_DEFAULT='$prefix/share'
-INPUT_install_sharedir_TITLE="Location for sharable data"
-INPUT_install_sharedir_VALIDATOR=validate_path
-
-
-# Show the menu and let people set things
-do_menu MENU main config.state
-echo "Configuration complete."
-
-# Set INSTALL_LIBDIR, INSTALL_BINDIR, and INSTALL_SHAREDIR to the specified
-# values, replacing '$prefix' to the prefix set.
-prefix="$INPUT_install_prefix_VALUE" \
-		eval INSTALL_BINDIR="${INPUT_install_bindir_VALUE%/}/"
-prefix="$INPUT_install_prefix_VALUE" \
-		eval INSTALL_LIBDIR="${INPUT_install_libdir_VALUE%/}/"
-prefix="$INPUT_install_prefix_VALUE" \
-		eval INSTALL_SHAREDIR="${INPUT_install_sharedir_VALUE%/}/"
+CFLAGS="$CFLAGS -O3"
+DEBUG=0
+CFLAGS="$CFLAGS -DGFXMODULE_SDL -DHAVE_OPENGL"
+HAVE_OPENGL=1
+use_library opengl
+CFLAGS="$CFLAGS -DSOUNDMODULE_SDL"
+SOUNDMODULE=mixsdl
+use_library vorbisfile
+CFLAGS="$CFLAGS -DHAVE_ZIP=1"
+USE_ZIP_IO=1
+use_library zlib
+
+INSTALL_BINDIR=${PREFIX}/bin/
+INSTALL_LIBDIR=${PREFIX}/lib/
+INSTALL_SHAREDIR=${PREFIX}/share/
 
 # Set the content dir
 CONTENTDIR="${INSTALL_SHAREDIR}uqm/content"
-
 
 # Export the HAVE_ symbols to config.h, using config.h.in as template
 SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR"