From: sof Date: Mon, 13 Oct 2003 05:08:22 +0000 (+0000) Subject: [project @ 2003-10-13 05:08:22 by sof] X-Git-Tag: Approx_11550_changesets_converted~369 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=781a72d5ad167f1eb4414efc2320bfc8aa8288da [project @ 2003-10-13 05:08:22 by sof] FPTOOLS_CHECK_HTYPE: mapping unsupported types to NotReallyAType is less than useful; simply don't define the symbol --- diff --git a/aclocal.m4 b/aclocal.m4 index 01e5c4f..f415429 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -657,10 +657,12 @@ dnl The name to #define. define(<>, translit(htype_$1, [a-z *], [A-Z_P]))dnl dnl The cache variable name. define(<>, translit(fptools_cv_htype_$1, [ *], [_p]))dnl +define(<>, translit(fptools_cv_htype_sup_$1, [ *], [_p]))dnl changequote([, ])dnl AC_MSG_CHECKING(Haskell type for $1) AC_CACHE_VAL(AC_CV_NAME, -[AC_TRY_RUN([#include +[AC_CV_NAME_supported=yes; +AC_TRY_RUN([#include #include #ifdef HAVE_SYS_TYPES_H @@ -727,16 +729,20 @@ main() { } fclose(f); exit(0); -}], AC_CV_NAME=`cat conftestval`, -ifelse([$2], , AC_CV_NAME=NotReallyAType, AC_CV_NAME=$2), -ifelse([$3], , AC_CV_NAME=NotReallyATypeCross, AC_CV_NAME=$3))]) dnl -AC_MSG_RESULT($AC_CV_NAME) -AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [Define to Haskell type for $1]) +}],AC_CV_NAME=`cat conftestval`, +ifelse([$2], , [AC_CV_NAME=NotReallyAType; AC_CV_NAME_supported=no], AC_CV_NAME=$2), +ifelse([$3], , [AC_CV_NAME=NotReallyATypeCross; AC_CV_NAME_supported=no], AC_CV_NAME=$3))]) dnl +if test "$AC_CV_NAME_supported" == yes; then + AC_MSG_RESULT($AC_CV_NAME) + AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) +else + AC_MSG_RESULT([not supported]) +fi undefine([AC_TYPE_NAME])dnl undefine([AC_CV_NAME])dnl +undefine([AC_CV_NAME_supported])dnl ]) - dnl Based on AC_TRY_LINK - run iftrue if links cleanly with no warning dnl FPTOOLS_TRY_LINK_NOWARN(flags,main?,iftrue,iffalse)