public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* autoconf help needed
@ 2004-11-17 20:02 Steve Kargl
  2004-11-17 20:26 ` Aaron W. LaFramboise
  2004-11-18 16:34 ` Arnaud Desitter
  0 siblings, 2 replies; 3+ messages in thread
From: Steve Kargl @ 2004-11-17 20:02 UTC (permalink / raw)
  To: gcc

I'm currently writing gfortran intrinsic procedures to
achieve backwards compatibility with g77.  I know very
little about autoconf (and friends), so I'm seeking advice.

I need to test that struct stat has the 3 members
st_blksize, st_rdev, and st_blocks.  I know my
code needs for example

#if HAVE_ST_BLKSIZE
  sarray[11] = buf.st_blksize;
#else
  sarray[11] = -1;
#endif

but I don't know how to make configure properly set
HAVE_ST_BLKSIZE.

-- 
Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: autoconf help needed
  2004-11-17 20:02 autoconf help needed Steve Kargl
@ 2004-11-17 20:26 ` Aaron W. LaFramboise
  2004-11-18 16:34 ` Arnaud Desitter
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron W. LaFramboise @ 2004-11-17 20:26 UTC (permalink / raw)
  To: Steve Kargl; +Cc: gcc

Steve Kargl wrote:

> I need to test that struct stat has the 3 members
> st_blksize, st_rdev, and st_blocks.  I know my
> code needs for example

See "Particular Structure Checks" and "Generic Structure Checks" in the
Autoconf manual, availible at
<http://www.gnu.org/software/autoconf/manual/autoconf-2.57/html_mono/autoconf.html#SEC56>.
 All you need to do is put the required macros in configure.ac, then
regenerate configure with autoconf and config.h with autoheader.

Hope this helps,

Aaron W. LaFramboise

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: autoconf help needed
  2004-11-17 20:02 autoconf help needed Steve Kargl
  2004-11-17 20:26 ` Aaron W. LaFramboise
@ 2004-11-18 16:34 ` Arnaud Desitter
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaud Desitter @ 2004-11-18 16:34 UTC (permalink / raw)
  To: Steve Kargl; +Cc: gcc


----- Original Message ----- 
From: "Steve Kargl" <sgk@troutmask.apl.washington.edu>
Newsgroups: gmane.comp.gcc.devel
Sent: Wednesday, November 17, 2004 7:58 PM
Subject: autoconf help needed


> I'm currently writing gfortran intrinsic procedures to
> achieve backwards compatibility with g77.  I know very
> little about autoconf (and friends), so I'm seeking advice.
> 
> I need to test that struct stat has the 3 members
> st_blksize, st_rdev, and st_blocks.  I know my
> code needs for example
> 
> #if HAVE_ST_BLKSIZE
>  sarray[11] = buf.st_blksize;
> #else
>  sarray[11] = -1;
> #endif
> 
> but I don't know how to make configure properly set
> HAVE_ST_BLKSIZE.

Try:
AC_CHECK_MEMBERS([struct stat.st_blksize])

which will define HAVE_STRUCT_STAT_ST_BLKSIZE

Regards,


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-18 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-17 20:02 autoconf help needed Steve Kargl
2004-11-17 20:26 ` Aaron W. LaFramboise
2004-11-18 16:34 ` Arnaud Desitter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).