[Libsysio-commit] LLNL_HPSS: libsysio configure.in
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2005-09-09 14:58:35
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9447 Modified Files: Tag: LLNL_HPSS configure.in Log Message: Deal with directory record variants that include or don't d_off, d_offset, d_reclen, and d_namlen. Index: configure.in =================================================================== RCS file: /cvsroot/libsysio/libsysio/configure.in,v retrieving revision 1.20.2.3 retrieving revision 1.20.2.4 diff -u -w -b -B -p -r1.20.2.3 -r1.20.2.4 --- configure.in 6 Sep 2005 14:35:32 -0000 1.20.2.3 +++ configure.in 9 Sep 2005 14:58:19 -0000 1.20.2.4 @@ -327,6 +327,100 @@ if test x$have_st_gen = xyes; then AC_DEFINE(HAVE_GENERATION) fi +AC_MSG_CHECKING(whether to define directory offset myself) + +# Check for d_off +# +AC_TRY_COMPILE([ +#include <sys/dirent.h>], +[struct dirent d; +#ifdef _DIRENT_HAVE_D_OFF +#error Already present +#endif +#ifdef _DIRENT_HAVE_D_OFF +d.d_off = 0; +#endif ], + have_d_off=yes, + have_d_off=no) + +# Check for d_offset +# +AC_TRY_COMPILE([ +#include <sys/dirent.h>], +[struct dirent d; +#if defined(_DIRENT_HAVE_D_OFF) +#error Not this one +#endif +#ifndef _DIRENT_HAVE_D_OFFSET +d.d_offset = 0; +#endif ], + have_d_offset=yes, + have_d_offset=no) + +have_d=no +if test x$have_d_off = xyes; then + have_d=d_off + AC_DEFINE(_DIRENT_HAVE_D_OFF) +elif test x$have_d_offset = xyes; then + have_d=d_offset + AC_DEFINE(_DIRENT_HAVE_D_OFFSET) +fi +AC_MSG_RESULT($have_d) + +# Check for d_reclen +# +AC_MSG_CHECKING(whether to define directory record length existence) +AC_TRY_COMPILE([ +#include <sys/dirent.h>], +[struct dirent d; +#if defined(_DIRENT_HAVE_D_RECLEN) +#error Not needed +#endif +d.d_reclen = 0; +#endif ], + have_d_reclen=yes, + have_d_reclen=no) +AC_MSG_RESULT($have_d_reclen) +if test x$have_d_reclen = xyes; then + AC_DEFINE(_DIRENT_HAVE_D_RECLEN) +fi + +# Check for d_type +# +AC_MSG_CHECKING(whether to define directory types existence) +AC_TRY_COMPILE([ +#include <sys/dirent.h>], +[struct dirent d; +#if defined(_DIRENT_HAVE_D_TYPE) +#error Not needed +#endif +d.d_type = 0; +#endif ], + have_d_type=yes, + have_d_type=no) +AC_MSG_RESULT($have_d_type) +if test x$have_d_type = xyes; then + AC_DEFINE(_DIRENT_HAVE_D_TYPE) +fi + +# Check for d_namlen +# +AC_MSG_CHECKING(whether to define directory names length existence) +AC_TRY_COMPILE([ +#include <sys/dirent.h>], +[struct dirent d; +#if defined(_DIRENT_HAVE_D_NAMLEN) +#error Not needed +#endif +d.d_namlen = 0; +#endif ], + have_d_namlen=yes, + have_d_namlen=no) +AC_MSG_RESULT($have_d_namlen) +if test x$have_d_namlen = xyes; then + AC_DEFINE(_DIRENT_HAVE_D_NAMLEN) +fi + AC_MSG_CHECKING(whether .text pseudo-op must be used) AC_CACHE_VAL(sysio_asm_dot_text, [dnl cat > conftest.s <<EOF |