summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-03 15:22:03 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-03 15:22:03 +0000
commite0ac7e9222379260a04ce26525837d592b68bc70 (patch)
treebc41393cad856af70c52c9254f38e824799547f6 /configure
parent81948eca1a725bbb48e4b4691670df0f11161d40 (diff)
downloadmpv-e0ac7e9222379260a04ce26525837d592b68bc70.tar.bz2
mpv-e0ac7e9222379260a04ce26525837d592b68bc70.tar.xz
detect termios.h if no sys/termios.h (qnx getch2 support working)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3282 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 25 insertions, 2 deletions
diff --git a/configure b/configure
index f54ac07513..ad2564986d 100755
--- a/configure
+++ b/configure
@@ -1216,13 +1216,34 @@ int main(void) { return 0; }
EOF
_termios=no
cc_check && _termios=yes
+ _def_termios_h_name='sys/termios.h'
fi
+# second test:
+if test "$_termios" = no ; then
+ cat > $TMPC <<EOF
+#include <termios.h>
+int main(void) { return 0; }
+EOF
+ _termios=no
+ cc_check && _termios=yes
+ _def_termios_h_name='termios.h'
+fi
+
if test "$_termios" = yes ; then
_def_termios='#define HAVE_TERMIOS 1'
- else
+ _def_termios_h='#undef HAVE_TERMIOS_H'
+ _def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
+
+ if test "$_def_termios_h_name" = 'sys/termios.h' ; then
+ _def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1'
+ elif test "$_def_termios_h_name" = 'termios.h' ; then
+ _def_termios_h='#define HAVE_TERMIOS_H 1'
+ fi
+else
_def_termios='#undef HAVE_TERMIOS'
+ _def_termios_h_name=''
fi
-echores "$_termios"
+echores "$_termios (using: $_def_termios_h_name)"
echocheck "shm"
@@ -2855,6 +2876,8 @@ $_def_termcap
/* termios flag for getch2.c */
$_def_termios
+$_def_termios_h
+$_def_termios_sys_h
/* enable PNG support */
$_def_png