aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2013-06-01 21:12:57 +0200
committerJanus Weil <janus@gcc.gnu.org>2013-06-01 21:12:57 +0200
commitc68a6e08c5177557d7ecc99a173593f064a15a7d (patch)
treea6739e4409a3e10989d6e8017e82b8fcd4de69d5 /gcc/configure
parent1c9f675fd91d50b9c4eb944481ab6a59386a89c7 (diff)
downloadgcc-c68a6e08c5177557d7ecc99a173593f064a15a7d.zip
gcc-c68a6e08c5177557d7ecc99a173593f064a15a7d.tar.gz
gcc-c68a6e08c5177557d7ecc99a173593f064a15a7d.tar.bz2
configure.ac: Add AC_HEADER_TIOCGWINSZ macro.
2013-06-01 Janus Weil <janus@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> * configure.ac: Add AC_HEADER_TIOCGWINSZ macro. * config.in: Regenerated. * configure: Regenerated. 2013-06-01 Janus Weil <janus@gcc.gnu.org> Mikael Morin <mikael@gcc.gnu.org> * error.c (get_terminal_width): Only limit the width if we're outputting to a terminal. Try to determine width via ioctl. Co-Authored-By: Mikael Morin <mikael@gcc.gnu.org> From-SVN: r199585
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure64
1 files changed, 62 insertions, 2 deletions
diff --git a/gcc/configure b/gcc/configure
index 1f03eac..8c22107 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -8293,6 +8293,66 @@ $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
+$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
+if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <termios.h>
+#ifdef TIOCGWINSZ
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ ac_cv_sys_tiocgwinsz_in_termios_h=yes
+else
+ ac_cv_sys_tiocgwinsz_in_termios_h=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
+$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
+
+if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
+$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
+if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#ifdef TIOCGWINSZ
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
+else
+ ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
+$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
+
+ if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
+
+$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
+
+ fi
+fi
+
for ac_header in limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \
fcntl.h unistd.h sys/file.h sys/time.h sys/mman.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
@@ -17834,7 +17894,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17837 "configure"
+#line 17897 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17940,7 +18000,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 17943 "configure"
+#line 18003 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H