2 # extra autoconf macros for Glasgow fptools distribution
6 # Has timezone the type time_t or long (HP-UX 10.20 apparently
9 AC_DEFUN(AC_TYPE_TIMEZONE,
10 [AC_CACHE_CHECK([type of timezone], ac_cv_type_timezone,
11 [AC_TRY_COMPILE([#if TIME_WITH_SYS_TIME
12 # include <sys/time.h>
16 # include <sys/time.h>
22 extern time_t timezone;
24 [int i;], ac_cv_type_timezone=time_t, ac_cv_type_timezone=long)])
25 AC_DEFINE_UNQUOTED(TYPE_TIMEZONE, $ac_cv_type_timezone)
29 # Is altzone available?
32 [AC_CACHE_CHECK([altzone], ac_cv_altzone,
33 [AC_TRY_LINK([#if TIME_WITH_SYS_TIME
34 # include <sys/time.h>
38 # include <sys/time.h>
44 ac_cv_altzone=yes, ac_cv_altzone=no)])
45 if test "$ac_cv_altzone" = yes; then
46 AC_DEFINE(HAVE_ALTZONE)
51 dnl ** check for leading underscores in symbol names
53 # Test for determining whether symbol names have a leading
56 # We assume that they _haven't_ if anything goes wrong.
58 AC_DEFUN(AC_UNDERSCORE,
59 [AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")dnl
60 AC_CACHE_CHECK([leading underscore in symbol names], ac_cv_lead_uscore,
61 AC_TRY_RUN([#ifdef HAVE_NLIST_H
63 changequote(<<, >>)dnl
65 struct nlist xYzzY[] = {{"_xYzzY", 0},{0}};
73 if(nlist(argv[0], xYzzY) == 0 && xYzzY[0].n_value != 0)
78 }], ac_cv_lead_uscore=yes, ac_cv_lead_uscore=no, ac_cv_lead_uscore=NO)),
80 # Hack!: nlist() under Digital UNIX insist on there being an _,
81 # but symbol table listings show none. What is going on here?!?
83 if test $HostPlatform = "alpha-dec-osf1"; then
86 LeadingUnderscore=`echo $ac_cv_lead_uscore | sed 'y/yesno/YESNO/'`
88 test -n "$verbose" && echo " setting LeadingUnderscore to $LeadingUnderscore"
89 AC_SUBST(LeadingUnderscore)