X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=e823a834cd7a47ae0570a166c8bff5992c56c978;hb=931242f927fca1ab372d6a0e4bc27653edeec853;hp=12e39bcf0dfaf31050e4b9d7f4acaca729315b6d;hpb=90825aa2271fac914ff9c0a7007e604debbbe93b;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index 12e39bc..e823a83 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,4 +1,4 @@ -dnl $Id: aclocal.m4,v 1.23 1998/07/24 10:42:34 sof Exp $ +dnl $Id: aclocal.m4,v 1.27 1998/08/16 16:45:37 sof Exp $ dnl dnl Extra autoconf macros for the Glasgow fptools dnl @@ -6,23 +6,6 @@ dnl To be a good autoconf citizen, names of local macros have dnl prefixed with FPTOOLS_ to ensure we don't clash dnl with any pre-supplied autoconf ones. -dnl -dnl Are we running under the GNU libc? Need -D_GNU_SOURCE to get -dnl caddr_t and such. -dnl -AC_DEFUN(FPTOOLS_GNU_LIBC, -[AC_CACHE_CHECK([GNU libc], fptools_cv_gnu_libc, -[AC_EGREP_CPP(yes, -[#include -#ifdef __GLIBC__ -yes -#endif -], fptools_cv_gnu_libc=yes, fptools_cv_gnu_libc=no)]) -if test "$fptools_cv_gnu_libc" = yes; then - AC_DEFINE(_GNU_SOURCE) -fi -]) - dnl dnl Has timezone the type time_t or long (HP-UX 10.20 apparently dnl has `long'..) @@ -105,7 +88,7 @@ char **argv; changequote([, ])dnl #endif exit(1); -}], ac_cv_lead_uscore=yes, ac_cv_lead_uscore=no, ac_cv_lead_uscore=NO) +}], fptools_cv_lead_uscore=yes, fptools_cv_lead_uscore=no, fptools_cv_lead_uscore=NO) ;; esac); LeadingUnderscore=`echo $fptools_cv_lead_uscore | sed 'y/yesno/YESNO/'` @@ -297,7 +280,7 @@ AC_DEFUN(FPTOOLS_PROG_GNUCPP, echo > conftest.c gcc -v -E conftest.c >/dev/null 2>conftest.out # \x5c = backslash - echo 'tr/\x5c/\//; /(\S+\/cpp)/ && print "[$]1";' > conftest.pl + echo 'tr/\x5c/\//; /(\S+\/)cpp/ && print "[$]{1}cpp -iprefix [$]1";' > conftest.pl fptools_cv_gnu_cpp="`eval $PerlCmd -n conftest.pl conftest.out`" rm -fr conftest* else @@ -413,3 +396,29 @@ if test "$fptools_cv_have_long_long" = yes; then AC_DEFINE(HAVE_LONG_LONG) fi ]) + +dnl *** Can we open files in binary mode? *** +dnl +AC_DEFUN(FPTOOLS_O_BINARY, +[ +AC_REQUIRE([AC_PROG_CC]) +AC_MSG_CHECKING(whether we can open files in binary mode) +AC_CACHE_VAL(fptools_cv_have_o_binary, +[ +AC_LANG_SAVE +AC_LANG_C +AC_TRY_COMPILE(, +[#ifdef HAVE_FCNTL_H +#include +#endif +int x = O_BINARY;], +fptools_cv_have_o_binary=yes, +fptools_cv_have_o_binary=no) +AC_LANG_RESTORE +]) +AC_MSG_RESULT($fptools_cv_have_o_binary) +if test "$fptools_cv_have_o_binary" = yes; then +AC_DEFINE(HAVE_O_BINARY) +fi +]) +