Mercurial > mplayer.hg
comparison configure @ 23757:6d1e09675a4f
Simplify termios test.
author | diego |
---|---|
date | Fri, 13 Jul 2007 17:54:45 +0000 |
parents | 08197608c0b8 |
children | 604adfeb3e64 |
comparison
equal
deleted
inserted
replaced
23756:08197608c0b8 | 23757:6d1e09675a4f |
---|---|
3262 fi | 3262 fi |
3263 echores "$_termcap" | 3263 echores "$_termcap" |
3264 | 3264 |
3265 | 3265 |
3266 echocheck "termios" | 3266 echocheck "termios" |
3267 _def_termios='#undef HAVE_TERMIOS' | |
3268 _def_termios_h='#undef HAVE_TERMIOS_H' | |
3269 _def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H' | |
3267 if test "$_termios" = auto ; then | 3270 if test "$_termios" = auto ; then |
3271 _termios=no | |
3272 for _termios_header in "sys/termios.h" "termios.h"; do | |
3268 cat > $TMPC <<EOF | 3273 cat > $TMPC <<EOF |
3269 #include <sys/termios.h> | 3274 #include <$_termios_header> |
3270 int main(void) { return 0; } | 3275 int main(void) { return 0; } |
3271 EOF | 3276 EOF |
3272 _termios=auto | 3277 cc_check && _termios=yes && _res_comment="$_termios_header" && break |
3273 cc_check && _termios=yes | 3278 done |
3274 _def_termios_h_name='sys/termios.h' | |
3275 fi | |
3276 # second test: | |
3277 if test "$_termios" = auto ; then | |
3278 cat > $TMPC <<EOF | |
3279 #include <termios.h> | |
3280 int main(void) { return 0; } | |
3281 EOF | |
3282 _termios=no | |
3283 cc_check && _termios=yes | |
3284 _def_termios_h_name='termios.h' | |
3285 fi | 3279 fi |
3286 | 3280 |
3287 if test "$_termios" = yes ; then | 3281 if test "$_termios" = yes ; then |
3288 _def_termios='#define HAVE_TERMIOS 1' | 3282 _def_termios='#define HAVE_TERMIOS 1' |
3289 _def_termios_h='#undef HAVE_TERMIOS_H' | 3283 if test "$_termios_header" = "termios.h" ; then |
3290 _def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H' | 3284 _def_termios_h='#define HAVE_TERMIOS_H 1' |
3291 | 3285 else |
3292 if test "$_def_termios_h_name" = 'sys/termios.h' ; then | |
3293 _def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1' | 3286 _def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1' |
3294 elif test "$_def_termios_h_name" = 'termios.h' ; then | 3287 fi |
3295 _def_termios_h='#define HAVE_TERMIOS_H 1' | |
3296 fi | |
3297 _res_comment="using $_def_termios_h_name" | |
3298 else | |
3299 _def_termios='#undef HAVE_TERMIOS' | |
3300 _def_termios_h_name='' | |
3301 fi | 3288 fi |
3302 echores "$_termios" | 3289 echores "$_termios" |
3303 | 3290 |
3304 | 3291 |
3305 echocheck "shm" | 3292 echocheck "shm" |