diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-07-15 21:12:18 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-07-15 21:12:18 +0000 |
commit | 741a7158e27bcd3d25129247359564d3995419ca (patch) | |
tree | 08093f18a213d1e7f17d107739677a670e5fe371 | |
parent | 51700bf75e523e5b4da020953df3ad9056b42b6f (diff) | |
download | rockbox-741a7158e27bcd3d25129247359564d3995419ca.tar.gz rockbox-741a7158e27bcd3d25129247359564d3995419ca.zip |
check for/use sys/soundcard.h instead (since it works for cygwin too)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7162 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | tools/configure | 20 | ||||
-rw-r--r-- | uisimulator/x11/sound.c | 2 |
2 files changed, 14 insertions, 8 deletions
diff --git a/tools/configure b/tools/configure index a92060a4e2..74364b3e22 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -52,6 +52,16 @@ crosswincc () { | |||
52 | endian="little" # windows is little endian | 52 | endian="little" # windows is little endian |
53 | } | 53 | } |
54 | 54 | ||
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 | fi # header file present | ||
61 | fi # has codecs | ||
62 | } | ||
63 | |||
64 | |||
55 | simcc () { | 65 | simcc () { |
56 | 66 | ||
57 | # default tool setup for native building | 67 | # default tool setup for native building |
@@ -73,6 +83,7 @@ simcc () { | |||
73 | # x11 version | 83 | # x11 version |
74 | GCCOPTS="$GCCOPTS" | 84 | GCCOPTS="$GCCOPTS" |
75 | LDOPTS='-L/usr/X11R6/lib -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11 -lpthread' | 85 | LDOPTS='-L/usr/X11R6/lib -lSM -lICE -lXt -lX11 -lXmu -lSM -lICE -lX11 -lpthread' |
86 | checksoundcard | ||
76 | fi | 87 | fi |
77 | output="rockboxui.exe" # use this as output binary name | 88 | output="rockboxui.exe" # use this as output binary name |
78 | ;; | 89 | ;; |
@@ -82,14 +93,9 @@ simcc () { | |||
82 | GCCOPTS="$GCCOPTS" | 93 | GCCOPTS="$GCCOPTS" |
83 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread' | 94 | LDOPTS='-L/usr/X11R6/lib -lX11 -lm -lXt -lXmu -lnsl -ldl -lpthread' |
84 | if [ "$simver" = "win32" ]; then | 95 | if [ "$simver" = "win32" ]; then |
85 | crosswincc # setup cross-compiler | 96 | crosswincc # setup cross-compiler |
86 | else | 97 | else |
87 | if test -n "$codecs"; then | 98 | checksoundcard |
88 | if test -f "/usr/include/linux/soundcard.h"; then | ||
89 | # We have a header file so we can build the sound code | ||
90 | use_simsound="#define ROCKBOX_HAS_SIMSOUND 1" | ||
91 | fi # header file present | ||
92 | fi # has codecs | ||
93 | fi # not a cross-compiler | 99 | fi # not a cross-compiler |
94 | ;; | 100 | ;; |
95 | 101 | ||
diff --git a/uisimulator/x11/sound.c b/uisimulator/x11/sound.c index 761ad01a72..c21615b46d 100644 --- a/uisimulator/x11/sound.c +++ b/uisimulator/x11/sound.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
29 | #include <sys/ioctl.h> | 29 | #include <sys/ioctl.h> |
30 | #include <linux/soundcard.h> | 30 | #include <sys/soundcard.h> |
31 | 31 | ||
32 | #include "sound.h" | 32 | #include "sound.h" |
33 | 33 | ||