groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] how to modify configure.in to test EBCDIC


From: Sándor Bárány
Subject: [Groff] how to modify configure.in to test EBCDIC
Date: Thu, 09 Mar 2000 19:44:02 -0500

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:

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

Analog to that on BS2000 !?

Sándor
---
Teacher: "Calvin, do you know what state you live in?"
Calvin:  "Denial." - Bill Waterson


reply via email to

[Prev in Thread] Current Thread [Next in Thread]