[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] how to modify configure.in to test EBCDIC
From: |
Sándor Bárány |
Subject: |
Re: [Groff] how to modify configure.in to test EBCDIC |
Date: |
Fri, 10 Mar 2000 09:03:18 -0500 |
Sorry, some lines at the beginning are missing from my previous post,
here is the whole file once more:
dnl Check for EBCDIC stolen from the LYNX port to OS390 Unix
AC_MSG_CHECKING(if character set is EBCDIC)
AC_TRY_COMPILE([ ],
[ /* TryCompile function for CharSet.
Treat any failure as ASCII for compatibility with existing art.
Use compile-time rather than run-time tests for cross-compiler
tolerance. */
#if '0'!=240
make an error "Character set is not EBCDIC"
#endif ],
[ # TryCompile action if true
cf_cv_ebcdic=yes ],
[ # TryCompile action if false
cf_cv_ebcdic=no])
# end of TryCompile ])
# end of CacheVal CvEbcdic
AC_MSG_RESULT($cf_cv_ebcdic)
case "$cf_cv_ebcdic" in #(vi
yes) AC_DEFINE(EBCDIC)
;;
*) ;;
esac
if test "$cf_cv_ebcdic" = "yes"; then
dnl If we have EBCDIC we most likley have OS390 Unix, let's test it!
AC_MSG_CHECKING(for OS/390 Unix)
case `uname` in
OS/390) OS390Unix="yes";
CFLAGS="$CFLAGS -D_ALL_SOURCE"; AC_MSG_RESULT(yes)
;;
*) OS390Unix="no";
AC_MSG_RESULT(no)
;;
esac
fi
Sándor Bárány wrote:
>
> It would be great to automagically find out, which character set is used
> by groff.
>
> Here is a possible way to do that:
>
> config.in.h should be modified to include
> #undef EBCDIC
>
> and a new test in config.in:
>