16 |
cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"' |
cflags='-DKEYMAP_PATH=\"$(KEYMAP_PATH)\"' |
17 |
ldflags='' |
ldflags='' |
18 |
rpath= |
rpath= |
19 |
|
withsound='yes' |
20 |
|
|
21 |
for arg in $*; do |
for arg in $*; do |
22 |
optarg=`echo $arg | sed 's/[-a-z]*=//'` |
optarg=`echo $arg | sed 's/[-a-z]*=//'` |
71 |
--with-ipv6) |
--with-ipv6) |
72 |
cflags="$cflags -DIPv6" |
cflags="$cflags -DIPv6" |
73 |
;; |
;; |
74 |
|
--without-sound*) |
75 |
|
withsound=no |
76 |
|
;; |
77 |
|
--with-sound) |
78 |
|
withsound=yes |
79 |
|
;; |
80 |
|
--with-sound=oss) |
81 |
|
withsound=$optarg |
82 |
|
;; |
83 |
|
--with-sound=sun) |
84 |
|
withsound=$optarg |
85 |
|
;; |
86 |
*) |
*) |
87 |
echo "Target directories:" |
echo "Target directories:" |
88 |
echo " --prefix=PREFIX location for architecture-independent files" |
echo " --prefix=PREFIX location for architecture-independent files" |
104 |
echo " --with-debug-rdp5 enable debugging of RDP5 code" |
echo " --with-debug-rdp5 enable debugging of RDP5 code" |
105 |
echo " --with-debug-clipboard enable debugging of clipboard code" |
echo " --with-debug-clipboard enable debugging of clipboard code" |
106 |
echo " --with-ipv6 enable support for IPv6" |
echo " --with-ipv6 enable support for IPv6" |
107 |
|
echo " --without-sound disable support for sound redirection" |
108 |
|
echo " --with-sound=ARG only detect sound-support for \"oss\" or \"sun\" (and BSD)" |
109 |
echo |
echo |
110 |
rm -f Makeconf |
rm -f Makeconf |
111 |
exit 1 |
exit 1 |
278 |
|
|
279 |
# Check for OSS sound support |
# Check for OSS sound support |
280 |
|
|
281 |
if [ -f /usr/include/sys/soundcard.h ]; then |
if [ -f /usr/include/sys/soundcard.h -a \( "$withsound" = "yes" -o "$withsound" = "oss" \) ]; then |
282 |
echo Sound support enabled: Open Sound System |
echo Sound support enabled: Open Sound System |
283 |
echo |
echo |
284 |
echo "SOUNDOBJ = rdpsnd.o rdpsnd_oss.o" >>Makeconf |
echo "SOUNDOBJ = rdpsnd.o rdpsnd_oss.o" >>Makeconf |
285 |
cflags="$cflags -DWITH_RDPSND" |
cflags="$cflags -DWITH_RDPSND" |
286 |
elif [ -f /usr/include/sys/audioio.h ]; then |
elif [ -f /usr/include/sys/audioio.h -a \( "$withsound" = "yes" -o "$withsound" = "sun" \) ]; then |
287 |
echo Sound support enabled: Sun/BSD |
echo Sound support enabled: Sun/BSD |
288 |
echo |
echo |
289 |
echo "SOUNDOBJ = rdpsnd.o rdpsnd_sun.o" >>Makeconf |
echo "SOUNDOBJ = rdpsnd.o rdpsnd_sun.o" >>Makeconf |
290 |
cflags="$cflags -DWITH_RDPSND" |
cflags="$cflags -DWITH_RDPSND" |
291 |
else |
else |
292 |
echo "WARNING: sound support disabled (no /usr/include/sys/soundcard.h or /usr/include/sys/audioio.h)" |
echo "WARNING: sound support disabled (no /usr/include/sys/soundcard.h or /usr/include/sys/audioio.h)" |
293 |
echo "Currently supported systems are Open Sound System and Sun" |
echo "Currently supported systems are Open Sound System (oss) and Sun/BSD (sun)" |
294 |
echo |
echo |
295 |
fi |
fi |
296 |
|
|
297 |
|
|
298 |
# Platform-specific options |
# Platform-specific options |
299 |
|
|
300 |
|
#Endianess |
301 |
|
cat >conftest.$$.c << EOF |
302 |
|
#include <stdlib.h> |
303 |
|
#include <signal.h> |
304 |
|
|
305 |
|
int main(int argc, char **argv) |
306 |
|
{ |
307 |
|
int test = 1; |
308 |
|
|
309 |
|
return(*(unsigned char*) (&test)); |
310 |
|
} |
311 |
|
EOF |
312 |
|
$cc -o conftest.$$ conftest.$$.c |
313 |
|
./conftest.$$ |
314 |
|
if [ "$?" = "0" ]; then |
315 |
|
echo "Architecture is big-endian" |
316 |
|
echo |
317 |
|
cflags="$cflags -DB_ENDIAN" |
318 |
|
else |
319 |
|
echo "Architecture is little-endian" |
320 |
|
echo |
321 |
|
cflags="$cflags -DL_ENDIAN" |
322 |
|
fi |
323 |
|
rm conftest.$$ conftest.$$.c |
324 |
|
|
325 |
|
#Alignment |
326 |
|
cat >conftest.$$.c << EOF |
327 |
|
#include <stdlib.h> |
328 |
|
#include <signal.h> |
329 |
|
int main(int argc, char **argv) |
330 |
|
{ |
331 |
|
unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 }; |
332 |
|
signal(SIGBUS, exit); |
333 |
|
signal(SIGABRT, exit); |
334 |
|
signal(SIGSEGV, exit); |
335 |
|
if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) { |
336 |
|
return 1; |
337 |
|
} |
338 |
|
return 0; |
339 |
|
} |
340 |
|
EOF |
341 |
|
$cc -o conftest.$$ conftest.$$.c |
342 |
|
need_alignment=yes |
343 |
|
./conftest.$$ && need_alignment=no |
344 |
|
if [ "$need_alignment" = "yes" ]; then |
345 |
|
echo "Architecture needs alignment" |
346 |
|
echo |
347 |
|
cflags="$cflags -DNEED_ALIGN" |
348 |
|
fi |
349 |
|
rm conftest.$$ conftest.$$.c |
350 |
|
|
351 |
# strip leading colon from rpath |
# strip leading colon from rpath |
352 |
rpath=`echo $rpath |sed 's/^://'` |
rpath=`echo $rpath |sed 's/^://'` |
353 |
|
|