summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac49
1 files changed, 49 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 54999b164..6c0459747 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1010,6 +1010,37 @@ main() { return sizeof(ino_t) < 8; }
fi
fi
fi
+AH_TEMPLATE([ZLONG_IS_LONG_LONG],
+[Define to 1 if the zlong type uses long long int.])
+if test "$zsh_cv_64_bit_type" = "long long"; then
+ dnl Remember this so we can get (s)printf output right.
+ AC_DEFINE(ZLONG_IS_LONG_LONG)
+fi
+
+dnl We'll blithely assume (f)printf supports the same types as sprintf.
+AC_CACHE_CHECK(for %lld printf support, zsh_cv_printf_has_lld,
+[AC_TRY_RUN(
+[#include <stdio.h>
+#include <string.h>
+int main(int argc, char **argv)
+{
+ long long foo = ((long long)0xdead << 40) | 0xf00d;
+ char buf[80];
+ sprintf(buf, "before%lldafter", foo);
+ if (!strcmp(buf, "before62677660341432333after")) {
+ return 0;
+ }
+ return 1;
+}
+],
+zsh_cv_printf_has_lld=yes,
+zsh_cv_printf_has_lld=no,
+zsh_cv_printf_has_lld=no)])
+AH_TEMPLATE(PRINTF_HAS_LLD,
+[Define to 1 if printf and sprintf support %lld for long long.])
+if test x$zsh_cv_printf_has_lld = xyes; then
+ AC_DEFINE(PRINTF_HAS_LLD)
+fi
dnl Check for sigset_t. Currently I'm looking in
dnl <sys/types.h> and <signal.h>. Others might need
@@ -1572,6 +1603,8 @@ AH_TEMPLATE([HAVE_NUMNAMES],
[Define if you have the terminfo numnames symbol.])
AH_TEMPLATE([HAVE_STRNAMES],
[Define if you have the terminfo strnames symbol.])
+AH_TEMPLATE([TGOTO_PROTO_MISSING],
+[Define if there is no prototype for the tgoto() terminal function.])
if test x$zsh_cv_path_term_header != xnone; then
AC_DEFINE(ZSH_HAVE_TERM_H)
@@ -1587,26 +1620,42 @@ if test x$zsh_cv_path_term_header != xnone; then
AC_TRY_LINK($term_includes, [char **test = boolcodes; puts(*test);],
AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
AC_MSG_RESULT($boolcodes)
+
AC_MSG_CHECKING(if numcodes is available)
AC_TRY_LINK($term_includes, [char **test = numcodes; puts(*test);],
AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
AC_MSG_RESULT($numcodes)
+
AC_MSG_CHECKING(if strcodes is available)
AC_TRY_LINK($term_includes, [char **test = strcodes; puts(*test);],
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
AC_MSG_RESULT($strcodes)
+
AC_MSG_CHECKING(if boolnames is available)
AC_TRY_LINK($term_includes, [char **test = boolnames; puts(*test);],
AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
AC_MSG_RESULT($boolnames)
+
AC_MSG_CHECKING(if numnames is available)
AC_TRY_LINK($term_includes, [char **test = numnames; puts(*test);],
AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
AC_MSG_RESULT($numnames)
+
AC_MSG_CHECKING(if strnames is available)
AC_TRY_LINK($term_includes, [char **test = strnames; puts(*test);],
AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
AC_MSG_RESULT($strnames)
+
+ dnl There are apparently defective terminal library headers on some
+ dnl versions of Solaris before 11.
+ AC_MSG_CHECKING(if tgoto prototype is missing)
+ tgoto_includes="$term_includes
+/* guaranteed to clash with any valid tgoto prototype */
+extern void tgoto(int **stuff, float **more_stuff);"
+ AC_TRY_LINK($tgoto_includes,
+ [int *stuff; float *more_stuff; tgoto(&stuff, &more_stuff);],
+ AC_DEFINE(TGOTO_PROTO_MISSING) tgotoprotomissing=yes, tgotoprotomissing=no)
+ AC_MSG_RESULT($tgotoprotomissing)
else
ZSH_TERM_H=
fi