X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=4f3259ce0100f46e22a80411afcc0a75ae50a61f;hb=fd87c1f8579dd5c118f1867bac42df86bc04ac54;hp=c99598ed1c1b2bcd8854e65bbcd2b88098331a3f;hpb=bb65c0a554d67fc1f4b9a87cf1f9dde5f4c05809;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index c99598e..4f3259c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,59 +1,17 @@ -dnl Extra autoconf macros for the Glasgow fptools -dnl -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 Is timezone around? (in a header file) -dnl -AC_DEFUN(FPTOOLS_HAVE_TIMEZONE, -[AC_CACHE_CHECK([timezone], fptools_cv_have_timezone, -[AC_TRY_COMPILE([#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif -], [return timezone;], -fptools_cv_have_timezone=yes, fptools_cv_have_timezone=no)]) -if test "$fptools_cv_have_timezone" = yes; then - AC_DEFINE(HAVE_TIMEZONE) -fi -]) - -dnl -dnl Has timezone the type time_t or long (HP-UX 10.20 apparently -dnl has `long'..) -dnl -AC_DEFUN(FPTOOLS_TYPE_TIMEZONE, -[AC_CACHE_CHECK([type of timezone], fptools_cv_type_timezone, -[AC_TRY_COMPILE([#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -extern time_t timezone; -], -[int i;], fptools_cv_type_timezone=time_t, fptools_cv_type_timezone=long)]) -AC_DEFINE_UNQUOTED(TYPE_TIMEZONE, $fptools_cv_type_timezone) -]) - -dnl *** Is altzone available? *** -dnl -AC_DEFUN(FPTOOLS_ALTZONE, -[AC_CACHE_CHECK([altzone], fptools_cv_altzone, -[AC_TRY_LINK([#if TIME_WITH_SYS_TIME +# Extra autoconf macros for the Glasgow fptools +# +# To be a good autoconf citizen, names of local macros have prefixed with FP_ to +# ensure we don't clash with any pre-supplied autoconf ones. + + +# FP_ALTZONE +# ------------------- +# Defines HAVE_DECL_ALTZONE to 1 if declared, 0 otherwise. +# Used by base package. +AC_DEFUN([FP_ALTZONE], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_DECLS([altzone], [], [],[#if TIME_WITH_SYS_TIME # include # include #else @@ -62,34 +20,8 @@ AC_DEFUN(FPTOOLS_ALTZONE, # else # include # endif -#endif -], [return altzone;], -fptools_cv_altzone=yes, fptools_cv_altzone=no)]) -if test "$fptools_cv_altzone" = yes; then - AC_DEFINE(HAVE_ALTZONE) -fi -]) - - -dnl *** Does libc contain GNU regex? *** -dnl -AC_DEFUN(FPTOOLS_REGEX_IN_LIBC, -[AC_CACHE_CHECK([for GNU regex in libc], fptools_cv_have_regex, -[AC_TRY_LINK([#if HAVE_UNISTD_H -#include -#endif -#include -],[ struct re_pattern_buffer patbuf; - re_compile_pattern("",0,&patbuf); - re_search_2 (&patbuf, "", 0, "",0, 0,0,0,0); ], -fptools_cv_have_regex=yes, fptools_cv_have_regex=no)]) -if test "$fptools_cv_have_regex" = yes; then - HaveGNURegex=YES -else - HaveGNURegex=NO -fi -AC_SUBST(HaveGNURegex) -]) +#endif]) +])# FP_ALTZONE dnl ** check for leading underscores in symbol names