1fdnl ###################################################################### 2dnl find if mntent_t field mnt_time exists and is of type "char *" 3AC_DEFUN([AMU_FIELD_MNTENT_T_MNT_TIME_STRING], 4[ 5AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string, 6ac_cv_field_mntent_t_mnt_time_string, 7[ 8# try to compile a program 9AC_TRY_COMPILE( 10AMU_MOUNT_HEADERS( 11[ 12/* now set the typedef */ 13#ifdef HAVE_STRUCT_MNTENT 14typedef struct mntent mntent_t; 15#else /* not HAVE_STRUCT_MNTENT */ 16# ifdef HAVE_STRUCT_MNTTAB 17typedef struct mnttab mntent_t; 18# else /* not HAVE_STRUCT_MNTTAB */ 19# error XXX: could not find definition for struct mntent or struct mnttab! 20# endif /* not HAVE_STRUCT_MNTTAB */ 21#endif /* not HAVE_STRUCT_MNTENT */ 22]), 23[ 24mntent_t mtt; 25char *cp = "test"; 26int i; 27mtt.mnt_time = cp; 28i = mtt.mnt_time[0]; 29], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no) 30]) 31if test "$ac_cv_field_mntent_t_mnt_time_string" = yes 32then 33 AC_DEFINE(HAVE_MNTENT_T_MNT_TIME_STRING) 34fi 35]) 36dnl ====================================================================== 37