diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-04-20 11:27:03 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-04-20 11:27:03 +0000 |
commit | 77854b7b920b78d1b0b522e57c041812c1db005a (patch) | |
tree | b9f876d2a06899e8654181c07b469c140819dfa6 /tools/configure | |
parent | ef1109ad9340e5039f54371eb40126a33cb20d2c (diff) | |
download | rockbox-77854b7b920b78d1b0b522e57c041812c1db005a.tar.gz rockbox-77854b7b920b78d1b0b522e57c041812c1db005a.zip |
Removed the question for simulator type and skipped the check for sound
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13214 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools/configure')
-rwxr-xr-x | tools/configure | 128 |
1 files changed, 21 insertions, 107 deletions
diff --git a/tools/configure b/tools/configure index 435d26347b..4878d7ce95 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -12,7 +12,6 @@ | |||
12 | CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes" | 12 | CCOPTS="-W -Wall -Wundef -O -nostdlib -ffreestanding -Wstrict-prototypes" |
13 | 13 | ||
14 | use_logf="#undef ROCKBOX_HAS_LOGF" | 14 | use_logf="#undef ROCKBOX_HAS_LOGF" |
15 | use_simsound="#undef ROCKBOX_HAS_SIMSOUND" | ||
16 | 15 | ||
17 | scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` | 16 | scriptver=`echo '$Revision$' | sed -e 's:\\$::g' -e 's/Revision: //'` |
18 | 17 | ||
@@ -52,16 +51,6 @@ crosswincc () { | |||
52 | endian="little" # windows is little endian | 51 | endian="little" # windows is little endian |
53 | } | 52 | } |
54 | 53 | ||
55 | checksoundcard () { | ||
56 | if test -n "$codecs"; then | ||
57 | if test -f "/usr/include/sys/soundcard.h"; then | ||
58 | # We have a header file so we can build the sound code | ||
59 | use_simsound="#define ROCKBOX_HAS_SIMSOUND 1" | ||
60 | echo "Enabled PCM sound playback in simulator" | ||
61 | fi # header file present | ||
62 | fi # has codecs | ||
63 | } | ||
64 | |||
65 | # scan the $PATH for the given command | 54 | # scan the $PATH for the given command |
66 | findtool(){ | 55 | findtool(){ |
67 | file="$1" | 56 | file="$1" |
@@ -87,69 +76,44 @@ simcc () { | |||
87 | 76 | ||
88 | output="rockboxui" # use this as default output binary name | 77 | output="rockboxui" # use this as default output binary name |
89 | 78 | ||
90 | if [ "$simver" = "sdl" ]; then | 79 | # generic sdl-config checker |
91 | # generic sdl-config checker | 80 | sdl=`findtool sdl-config` |
92 | sdl=`findtool sdl-config` | ||
93 | 81 | ||
94 | if [ -z "$sdl" ]; then | 82 | if [ -z "$sdl" ]; then |
95 | echo "configure didn't find sdl-config, which indicates that you" | 83 | echo "configure didn't find sdl-config, which indicates that you" |
96 | echo "don't have SDL (properly) installed. Please correct and" | 84 | echo "don't have SDL (properly) installed. Please correct and" |
97 | echo "re-run configure!" | 85 | echo "re-run configure!" |
98 | exit | 86 | exit |
99 | fi | ||
100 | fi | 87 | fi |
101 | 88 | ||
89 | # default share option, override below if needed | ||
90 | SHARED_FLAG="-shared" | ||
91 | |||
102 | case $uname in | 92 | case $uname in |
103 | CYGWIN*) | 93 | CYGWIN*) |
104 | echo "Cygwin host detected" | 94 | echo "Cygwin host detected" |
105 | 95 | ||
106 | SHARED_FLAG="-shared" | 96 | # sdl version |
107 | if [ "$simver" = "win32" ]; then | 97 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" |
108 | # win32 version | 98 | LDOPTS="`sdl-config --libs` -mconsole" |
109 | GCCOPTS="$GCCOPTS -mno-cygwin -DNOCYGWIN" | 99 | |
110 | LDOPTS="-lgdi32 -luser32 -mno-cygwin" | ||
111 | elif [ "$simver" = "sdl" ]; then | ||
112 | # sdl version | ||
113 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" | ||
114 | LDOPTS="`sdl-config --libs` -mconsole" | ||
115 | checksoundcard | ||
116 | else | ||
117 | # x11 version | ||
118 | GCCOPTS="$GCCOPTS" | ||
119 | LDOPTS='-L/usr/X11R6/lib -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11 -lpthread' | ||
120 | checksoundcard | ||
121 | fi | ||
122 | output="rockboxui.exe" # use this as output binary name | 100 | output="rockboxui.exe" # use this as output binary name |
123 | ;; | 101 | ;; |
124 | 102 | ||
125 | Linux) | 103 | Linux) |
126 | echo "Linux host detected" | 104 | echo "Linux host detected" |
127 | GCCOPTS="$GCCOPTS" | 105 | GCCOPTS="$GCCOPTS" |
128 | SHARED_FLAG="-shared" | 106 | if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then |
129 | if [ "$simver" = "win32" ]; then | 107 | # Enable crosscompiling if sdl-config is from Windows SDL |
130 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread' | 108 | crosswincc |
131 | crosswincc # setup cross-compiler | 109 | fi |
132 | elif [ "$simver" = "sdl" ]; then | 110 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" |
133 | if [ "0" != `sdl-config --libs |grep -c mwindows` ]; then | 111 | LDOPTS="`sdl-config --libs`" |
134 | # Enable crosscompiling if sdl-config is from Windows SDL | ||
135 | crosswincc | ||
136 | fi | ||
137 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" | ||
138 | LDOPTS="`sdl-config --libs`" | ||
139 | checksoundcard | ||
140 | else | ||
141 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread' | ||
142 | checksoundcard | ||
143 | fi # not a cross-compiler | ||
144 | ;; | 112 | ;; |
145 | 113 | ||
146 | FreeBSD) | 114 | FreeBSD) |
147 | echo "FreeBSD host detected" | 115 | echo "FreeBSD host detected" |
148 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -dl -lpthread' | 116 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -dl -lpthread' |
149 | SHARED_FLAG="-shared" | ||
150 | if [ "$simver" = "win32" ]; then | ||
151 | crosswincc # setup cross-compiler | ||
152 | fi | ||
153 | ;; | 117 | ;; |
154 | 118 | ||
155 | Darwin) | 119 | Darwin) |
@@ -158,8 +122,6 @@ simcc () { | |||
158 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" | 122 | GCCOPTS="$GCCOPTS `sdl-config --cflags`" |
159 | LDOPTS="`sdl-config --libs`" | 123 | LDOPTS="`sdl-config --libs`" |
160 | SHARED_FLAG="-dynamiclib -Wl\,-single_module" | 124 | SHARED_FLAG="-dynamiclib -Wl\,-single_module" |
161 | use_simsound="#define ROCKBOX_HAS_SIMSOUND 1" | ||
162 | echo "Enabled PCM sound playback in simulator" | ||
163 | ;; | 125 | ;; |
164 | 126 | ||
165 | *) | 127 | *) |
@@ -322,7 +284,6 @@ whichadvanced () { | |||
322 | if [ "yes" = "$simulator" ]; then | 284 | if [ "yes" = "$simulator" ]; then |
323 | debug="-DDEBUG" | 285 | debug="-DDEBUG" |
324 | extradefines="$extradefines -DSIMULATOR" | 286 | extradefines="$extradefines -DSIMULATOR" |
325 | whichsim | ||
326 | fi | 287 | fi |
327 | if [ "yes" = "$profile" ]; then | 288 | if [ "yes" = "$profile" ]; then |
328 | extradefines="$extradefines -DRB_PROFILE" | 289 | extradefines="$extradefines -DRB_PROFILE" |
@@ -330,45 +291,6 @@ whichadvanced () { | |||
330 | fi | 291 | fi |
331 | } | 292 | } |
332 | 293 | ||
333 | whichsim () { | ||
334 | |||
335 | if [ -z "$simver" ]; then | ||
336 | |||
337 | ################################################################## | ||
338 | # Figure out what simulator version | ||
339 | # | ||
340 | # x11 is deprecated so hide it from the question | ||
341 | # win32 is also deprecated | ||
342 | # | ||
343 | echo "" | ||
344 | echo "Build (S)DL version? (S)" | ||
345 | |||
346 | option=`input`; | ||
347 | |||
348 | case $option in | ||
349 | [Ww]) | ||
350 | simver="win32" | ||
351 | |||
352 | WINDRES=windres | ||
353 | DLLTOOL=dlltool | ||
354 | DLLWRAP=dllwrap | ||
355 | |||
356 | # make sure the code knows this is for win32 | ||
357 | extradefines="$extradefines -DWIN32" | ||
358 | ;; | ||
359 | [Xx]) | ||
360 | simver="x11" | ||
361 | extradefines="$extradefines -DX11" | ||
362 | ;; | ||
363 | [Ss]|*) | ||
364 | simver="sdl" | ||
365 | extradefines="$extradefines -DSDL" | ||
366 | ;; | ||
367 | esac | ||
368 | echo "Selected $simver simulator" | ||
369 | fi | ||
370 | } | ||
371 | |||
372 | voiceconfig () { | 294 | voiceconfig () { |
373 | echo "Building voice for $archos" | 295 | echo "Building voice for $archos" |
374 | echo "" | 296 | echo "" |
@@ -1380,7 +1302,6 @@ fi | |||
1380 | simulator="yes" | 1302 | simulator="yes" |
1381 | extradefines="-DSIMULATOR" | 1303 | extradefines="-DSIMULATOR" |
1382 | echo "Simulator build selected" | 1304 | echo "Simulator build selected" |
1383 | whichsim | ||
1384 | ;; | 1305 | ;; |
1385 | [Aa]) | 1306 | [Aa]) |
1386 | echo "Advanced build selected" | 1307 | echo "Advanced build selected" |
@@ -1559,7 +1480,6 @@ fi | |||
1559 | sed > autoconf.h \ | 1480 | sed > autoconf.h \ |
1560 | -e "s,@ENDIAN@,${defendian},g" \ | 1481 | -e "s,@ENDIAN@,${defendian},g" \ |
1561 | -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \ | 1482 | -e "s,^#undef ROCKBOX_HAS_LOGF,$use_logf,g" \ |
1562 | -e "s,@SIMSOUND@,$use_simsound,g" \ | ||
1563 | -e "s,@config_rtc@,$config_rtc,g" \ | 1483 | -e "s,@config_rtc@,$config_rtc,g" \ |
1564 | -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \ | 1484 | -e "s,@have_rtc_alarm@,$have_rtc_alarm,g" \ |
1565 | <<EOF | 1485 | <<EOF |
@@ -1573,10 +1493,6 @@ sed > autoconf.h \ | |||
1573 | /* Define this if you build rockbox to support the logf logging and display */ | 1493 | /* Define this if you build rockbox to support the logf logging and display */ |
1574 | #undef ROCKBOX_HAS_LOGF | 1494 | #undef ROCKBOX_HAS_LOGF |
1575 | 1495 | ||
1576 | /* Define this if you have the linux/soundcard.h header and thus can compile | ||
1577 | the sound-playing code in the X11 sim */ | ||
1578 | @SIMSOUND@ | ||
1579 | |||
1580 | /* optional defines for RTC mod for h1x0 */ | 1496 | /* optional defines for RTC mod for h1x0 */ |
1581 | @config_rtc@ | 1497 | @config_rtc@ |
1582 | @have_rtc_alarm@ | 1498 | @have_rtc_alarm@ |
@@ -1641,7 +1557,6 @@ sed > Makefile \ | |||
1641 | -e "s,@FIRMDIR@,${firmdir},g" \ | 1557 | -e "s,@FIRMDIR@,${firmdir},g" \ |
1642 | -e "s,@TOOLSDIR@,${toolsdir},g" \ | 1558 | -e "s,@TOOLSDIR@,${toolsdir},g" \ |
1643 | -e "s,@APPS@,${apps},g" \ | 1559 | -e "s,@APPS@,${apps},g" \ |
1644 | -e "s,@SIMVER@,${simver},g" \ | ||
1645 | -e "s,@GCCVER@,${gccver},g" \ | 1560 | -e "s,@GCCVER@,${gccver},g" \ |
1646 | -e "s,@GCCNUM@,${gccnum},g" \ | 1561 | -e "s,@GCCNUM@,${gccnum},g" \ |
1647 | -e "s,@UNAME@,${uname},g" \ | 1562 | -e "s,@UNAME@,${uname},g" \ |
@@ -1707,8 +1622,7 @@ export PROFILE_OPTS=@PROFILE_OPTS@ | |||
1707 | export GCCOPTS=@GCCOPTS@ | 1622 | export GCCOPTS=@GCCOPTS@ |
1708 | export TARGET_INC=@TARGET_INC@ | 1623 | export TARGET_INC=@TARGET_INC@ |
1709 | export LOADADDRESS=@LOADADDRESS@ | 1624 | export LOADADDRESS=@LOADADDRESS@ |
1710 | export SIMVER=@SIMVER@ | 1625 | export SIMDIR=\$(ROOTDIR)/uisimulator/sdl |
1711 | export SIMDIR=\$(ROOTDIR)/uisimulator/\$(SIMVER) | ||
1712 | export SHARED_FLAG=@SHARED_FLAG@ | 1626 | export SHARED_FLAG=@SHARED_FLAG@ |
1713 | export LDOPTS=@LDOPTS@ | 1627 | export LDOPTS=@LDOPTS@ |
1714 | export GCCVER=@GCCVER@ | 1628 | export GCCVER=@GCCVER@ |