From: Eric Sunshine Date: Sun, 21 Dec 2014 21:47:02 GMT Subject: Re: [PATCH 1/3] configure.ac: check tv_nsec field in struct stat Message-ID: In-Reply-To: On Sun, Dec 21, 2014 at 3:20 PM, Eric Sunshine wrote: > On Sun, Dec 21, 2014 at 1:53 PM, Reuben Hawkins wrote: >> +AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec], >> +[HAVE_ST_MTIM=Yes], >> +[HAVE_ST_MTIM=No], > > In Autoconf, it's customary to use lowercase values (such as "yes" > rather than "Yes") for these temporary variables. A "no" value is > usually represented by an empty assignment (HAVE_ST_MTIM=). However, > AC_CHECK_MEMBER() assigns the test result automatically to a shell > variable (in this case, named > ac_cv_member_struct_stat_st_mtim_tv_nsec), so there is no need to > invent your own (HAVE_ST_MTIM). > > So, you can reduce this to: > > AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec]) > > and later check the value with > > test x$ac_cv_member_struct_stat_st_mtim_tv_nsec = yes Apple auto-correction strikes again: s/yes/xyes/