From c281d94c469bec6e34b0ccf74f02f0d3c0c6f7e2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 29 Jan 1999 05:05:56 +0000 Subject: [PATCH] Use the 3-argument forms of AC_DEFINE* macros. --- m4/assert.m4 | 10 +++++----- m4/chown.m4 | 10 +++------- m4/d-ino.m4 | 6 ++++-- m4/d-type.m4 | 6 ++++-- m4/fnmatch.m4 | 10 +++------- m4/getgroups.m4 | 9 +++------ m4/gettext.m4 | 12 +++++++----- m4/jm-mktime.m4 | 12 +++++------- m4/jm-winsz2.m4 | 5 +++-- m4/lcmessage.m4 | 5 +++-- m4/ls-mntd-fs.m4 | 41 +++++++++++++++++++++++++++++++---------- m4/malloc.m4 | 10 +++------- m4/memcmp.m4 | 10 +++------- m4/putenv.m4 | 10 +++------- m4/realloc.m4 | 10 +++------- m4/st_mtim.m4 | 6 ++++-- m4/strftime.m4 | 10 +++------- 17 files changed, 90 insertions(+), 92 deletions(-) diff --git a/m4/assert.m4 b/m4/assert.m4 index 00e45ab4d..c7348e4d2 100644 --- a/m4/assert.m4 +++ b/m4/assert.m4 @@ -1,13 +1,13 @@ -#serial 1 +#serial 2 dnl based on code from Eleftherios Gkioulekas AC_DEFUN(jm_ASSERT, [ AC_MSG_CHECKING(whether to enable assertions) AC_ARG_ENABLE(assert, - [ --disable-assert turn off assertions], - [ AC_MSG_RESULT(no) - AC_DEFINE(NDEBUG) ], - [ AC_MSG_RESULT(yes) ] + [ --disable-assert turn off assertions], + [ AC_MSG_RESULT(no) + AC_DEFINE(NDEBUG,1,[Define to 1 if assertions should be disabled.]) ], + [ AC_MSG_RESULT(yes) ] ) ]) diff --git a/m4/chown.m4 b/m4/chown.m4 index ed6504747..b3c0a7c43 100644 --- a/m4/chown.m4 +++ b/m4/chown.m4 @@ -1,14 +1,9 @@ -#serial 3 +#serial 4 dnl From Jim Meyering. dnl Determine whether chown accepts arguments of -1 for uid and gid. dnl If it doesn't, arrange to use the replacement function. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_chown if the replacement function should be used. */ -dnl #undef chown -dnl AC_DEFUN(jm_FUNC_CHOWN, [AC_REQUIRE([AC_TYPE_UID_T])dnl @@ -48,6 +43,7 @@ AC_DEFUN(jm_FUNC_CHOWN, ]) if test $jm_cv_func_working_chown = no; then LIBOBJS="$LIBOBJS chown.o" - AC_DEFINE_UNQUOTED(chown, rpl_chown) + AC_DEFINE_UNQUOTED(chown, rpl_chown, + [Define to rpl_chown if the replacement function should be used.]) fi ]) diff --git a/m4/d-ino.m4 b/m4/d-ino.m4 index 56614ff46..289452abd 100644 --- a/m4/d-ino.m4 +++ b/m4/d-ino.m4 @@ -1,4 +1,4 @@ -#serial 1 +#serial 2 dnl From Jim Meyering. dnl @@ -34,7 +34,9 @@ AC_DEFUN(jm_STRUCT_DIRENT_D_INO, ] ) if test $jm_cv_struct_dirent_d_ino = yes; then - AC_DEFINE(D_INO_IN_DIRENT) + AC_DEFINE(D_INO_IN_DIRENT, 1, + [Define if there is a member named d_ino in the struct describing + directory headers.]) fi ] ) diff --git a/m4/d-type.m4 b/m4/d-type.m4 index b3838f1f5..e5f9e4205 100644 --- a/m4/d-type.m4 +++ b/m4/d-type.m4 @@ -1,4 +1,4 @@ -#serial 1 +#serial 2 dnl From Jim Meyering. dnl @@ -34,7 +34,9 @@ AC_DEFUN(jm_STRUCT_DIRENT_D_TYPE, ] ) if test $jm_cv_struct_dirent_d_type = yes; then - AC_DEFINE(D_TYPE_IN_DIRENT) + AC_DEFINE(D_TYPE_IN_DIRENT, 1, + [Define if there is a member named d_type in the struct describing + directory headers.]) fi ] ) diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 index 1d3cfb482..a94f45dd2 100644 --- a/m4/fnmatch.m4 +++ b/m4/fnmatch.m4 @@ -1,13 +1,8 @@ -#serial 1 +#serial 2 dnl Determine whether to add fnmatch.o to LIBOBJS and to dnl define fnmatch to rpl_fnmatch. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_fnmatch if the replacement function should be used. */ -dnl #undef fnmatch -dnl AC_DEFUN(jm_FUNC_FNMATCH, [ @@ -16,6 +11,7 @@ AC_DEFUN(jm_FUNC_FNMATCH, if test $ac_cv_func_fnmatch_works = no \ && test $ac_cv_gnu_library = no; then LIBOBJS="$LIBOBJS fnmatch.o" - AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch) + AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch, + [Define to rpl_fnmatch if the replacement function should be used.]) fi ]) diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 index 2774b8ce8..37387dda3 100644 --- a/m4/getgroups.m4 +++ b/m4/getgroups.m4 @@ -1,10 +1,6 @@ -#serial 2 +#serial 3 dnl From Jim Meyering. -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_getgroups if the replacement function should be used. */ -dnl #undef getgroups dnl dnl Invoking code should check $GETGROUPS_LIB something like this: dnl jm_FUNC_GETGROUPS @@ -43,7 +39,8 @@ AC_DEFUN(jm_FUNC_GETGROUPS, ]) if test $jm_cv_func_working_getgroups = no; then LIBOBJS="$LIBOBJS getgroups.o" - AC_DEFINE_UNQUOTED(getgroups, rpl_getgroups) + AC_DEFINE_UNQUOTED(getgroups, rpl_getgroups, + [Define as rpl_getgroups if getgroups doesn't work right.]) fi fi ]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 index d0b484543..118ce622d 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -6,7 +6,7 @@ # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. -# serial 105 +# serial 106 AC_DEFUN(AM_WITH_NLS, [AC_MSG_CHECKING([whether NLS is requested]) @@ -21,7 +21,7 @@ AC_DEFUN(AM_WITH_NLS, dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS) + AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.]) AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], @@ -61,7 +61,8 @@ AC_DEFUN(AM_WITH_NLS, if test "$gt_cv_func_gettext_libc" = "yes" \ || test "$gt_cv_func_gettext_libintl" = "yes"; then - AC_DEFINE(HAVE_GETTEXT) + AC_DEFINE(HAVE_GETTEXT, 1, + [Define to 1 if you have gettext and don't want to use GNU gettext.]) AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then @@ -91,7 +92,8 @@ AC_DEFUN(AM_WITH_NLS, dnl No gettext in C library. Try catgets next. AC_CHECK_LIB(i, main) AC_CHECK_FUNC(catgets, - [AC_DEFINE(HAVE_CATGETS) + [AC_DEFINE(HAVE_CATGETS, 1, + [Define as 1 if you have catgets and don't want to use GNU gettext.]) INTLOBJS="\$(CATOBJS)" AC_PATH_PROG(GENCAT, gencat, no)dnl if test "$GENCAT" != "no"; then @@ -224,7 +226,7 @@ strdup __argz_count __argz_stringify __argz_next]) AC_CHECK_FUNCS(stpcpy) fi if test "${ac_cv_func_stpcpy}" = "yes"; then - AC_DEFINE(HAVE_STPCPY) + AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.]) fi AM_LC_MESSAGES diff --git a/m4/jm-mktime.m4 b/m4/jm-mktime.m4 index af3611793..abdc21d60 100644 --- a/m4/jm-mktime.m4 +++ b/m4/jm-mktime.m4 @@ -1,11 +1,8 @@ -#serial 3 +#serial 4 dnl From Jim Meyering. -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_mktime if the replacement function should be used. */ -dnl #undef mktime -dnl +dnl A wrapper around jm_AM_FUNC_MKTIME. + AC_DEFUN(jm_FUNC_MKTIME, [AC_REQUIRE([jm_AM_FUNC_MKTIME])dnl @@ -13,6 +10,7 @@ AC_DEFUN(jm_FUNC_MKTIME, AC_CHECK_FUNCS(localtime_r) if test $jm_am_cv_func_working_mktime = no; then - AC_DEFINE_UNQUOTED(mktime, rpl_mktime) + AC_DEFINE_UNQUOTED(mktime, rpl_mktime, + [Define to gnu_mktime if the replacement function should be used.]) fi ]) diff --git a/m4/jm-winsz2.m4 b/m4/jm-winsz2.m4 index 642e1ff14..f3c470924 100644 --- a/m4/jm-winsz2.m4 +++ b/m4/jm-winsz2.m4 @@ -1,4 +1,4 @@ -#serial 2 +#serial 3 AC_DEFUN(jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, [AC_REQUIRE([jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H]) @@ -17,6 +17,7 @@ AC_DEFUN(jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL, fi ]) if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then - AC_DEFINE(GWINSZ_IN_SYS_IOCTL) + AC_DEFINE(GWINSZ_IN_SYS_IOCTL, 1, + [Define if your system defines TIOCGWINSZ in sys/ioctl.h.]) fi ]) diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4 index e31bb5334..4f9edcbb1 100644 --- a/m4/lcmessage.m4 +++ b/m4/lcmessage.m4 @@ -6,7 +6,7 @@ # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. -# serial 1 +# serial 2 AC_DEFUN(AM_LC_MESSAGES, [if test $ac_cv_header_locale_h = yes; then @@ -14,6 +14,7 @@ AC_DEFUN(AM_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then - AC_DEFINE(HAVE_LC_MESSAGES) + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your locale.h file contains LC_MESSAGES.]) fi fi]) diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 index 79bcb069e..64ce1f103 100644 --- a/m4/ls-mntd-fs.m4 +++ b/m4/ls-mntd-fs.m4 @@ -1,4 +1,4 @@ -#serial 1 +#serial 2 dnl From Jim Meyering. dnl @@ -46,7 +46,9 @@ yes AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) if test $fu_cv_sys_mounted_cray_listmntent = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_LISTMNTENT) + AC_DEFINE(MOUNTED_LISTMNTENT, 1, + [Define if there is a function named listmntent that can be used to + list all mounted filesystems. (UNICOS)]) fi fi @@ -65,7 +67,10 @@ if test $ac_cv_func_getmntent = yes; then AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) if test $fu_cv_sys_mounted_getmntent1 = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTENT1) + AC_DEFINE(MOUNTED_GETMNTENT1, 1, + [Define if there is a function named getmntent for reading the list + of mounted filesystems, and that function takes a single argument. + (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) fi fi @@ -79,7 +84,9 @@ if test $ac_cv_func_getmntent = yes; then AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) if test $fu_cv_sys_mounted_getmntent2 = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTENT2) + AC_DEFINE(MOUNTED_GETMNTENT2, 1, + [Define if there is a function named getmntent for reading the list of + mounted filesystems, and that function takes two arguments. (SVR4)]) fi fi @@ -104,7 +111,9 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_getsstat) if test $fu_cv_sys_mounted_getsstat = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_GETFSSTAT) + AC_DEFINE(MOUNTED_GETFSSTAT, 1, + [Define if there is a function named getfsstat for reading the + list of mounted filesystems. (DEC Alpha running OSF/1)]) fi fi @@ -118,7 +127,10 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_vmount) if test $fu_cv_sys_mounted_vmount = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_VMOUNT) + AC_DEFINE(MOUNTED_VMOUNT, 1, + [Define if there is a function named mntctl that can be used to read + the list of mounted filesystems, and there is a system header file + that declares \`struct vmount.' (AIX)]) fi fi @@ -135,7 +147,10 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) if test $fu_cv_sys_mounted_fread_fstyp = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_FREAD_FSTYP) + AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, +[Define if (like SVR2) there is no specific function for reading the + list of mounted filesystems, and your system has these header files: + and . (SVR3)]) fi fi @@ -156,7 +171,9 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) if test $fu_cv_sys_mounted_getmntinfo = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO) + AC_DEFINE(MOUNTED_GETMNTINFO, 1, + [Define if there is a function named getmntinfo for reading the + list of mounted filesystems. (4.4BSD)]) fi fi @@ -174,7 +191,9 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) if test $fu_cv_sys_mounted_getmnt = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNT) + AC_DEFINE(MOUNTED_GETMNT, 1, + [Define if there is a function named getmnt for reading the list of + mounted filesystems. (Ultrix)]) fi fi @@ -188,7 +207,9 @@ if test -z "$list_mounted_fs"; then AC_MSG_RESULT($fu_cv_sys_mounted_fread) if test $fu_cv_sys_mounted_fread = yes; then list_mounted_fs=found - AC_DEFINE(MOUNTED_FREAD) + AC_DEFINE(MOUNTED_FREAD, 1, + [Define if there is no specific function for reading the list of + mounted filesystems. fread will be used to read /etc/mnttab. (SVR2) ]) fi fi diff --git a/m4/malloc.m4 b/m4/malloc.m4 index 85d62efa8..893c6e21d 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,14 +1,9 @@ -#serial 2 +#serial 3 dnl From Jim Meyering. dnl Determine whether malloc accepts 0 as its argument. dnl If it doesn't, arrange to use the replacement function. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_malloc if the replacement function should be used. */ -dnl #undef malloc -dnl AC_DEFUN(jm_FUNC_MALLOC, [ @@ -33,6 +28,7 @@ AC_DEFUN(jm_FUNC_MALLOC, ]) if test $jm_cv_func_working_malloc = no; then LIBOBJS="$LIBOBJS malloc.o" - AC_DEFINE_UNQUOTED(malloc, rpl_malloc) + AC_DEFINE_UNQUOTED(malloc, rpl_malloc, + [Define to rpl_malloc if the replacement function should be used.]) fi ]) diff --git a/m4/memcmp.m4 b/m4/memcmp.m4 index 82b4b7cc8..390014f41 100644 --- a/m4/memcmp.m4 +++ b/m4/memcmp.m4 @@ -1,4 +1,4 @@ -#serial 2 +#serial 3 dnl A replacement for autoconf's AC_FUNC_MEMCMP that detects dnl the losing memcmp on some x86 Next systems. @@ -42,14 +42,10 @@ test $jm_cv_func_memcmp_working = no && LIBOBJS="$LIBOBJS memcmp.o" AC_SUBST(LIBOBJS)dnl ]) -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_memcmp if the replacement function should be used. */ -dnl #undef memcmp -dnl AC_DEFUN(jm_FUNC_MEMCMP, [AC_REQUIRE([jm_AC_FUNC_MEMCMP])dnl if test $jm_cv_func_memcmp_working = no; then - AC_DEFINE_UNQUOTED(memcmp, rpl_memcmp) + AC_DEFINE_UNQUOTED(memcmp, rpl_memcmp, + [Define to rpl_memcmp if the replacement function should be used.]) fi ]) diff --git a/m4/putenv.m4 b/m4/putenv.m4 index 0c4aebf4a..c1f444b2f 100644 --- a/m4/putenv.m4 +++ b/m4/putenv.m4 @@ -1,15 +1,10 @@ -#serial 1 +#serial 2 dnl From Jim Meyering. dnl dnl Check whether putenv ("FOO") removes FOO from the environment. dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_putenv if the replacement function should be used. */ -dnl #undef putenv -dnl AC_DEFUN(jm_FUNC_PUTENV, [AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv, @@ -39,6 +34,7 @@ AC_DEFUN(jm_FUNC_PUTENV, ]) if test $jm_cv_func_svid_putenv = no; then LIBOBJS="$LIBOBJS putenv.o" - AC_DEFINE_UNQUOTED(putenv, rpl_putenv) + AC_DEFINE_UNQUOTED(putenv, rpl_putenv, + [Define to rpl_memcmp if the replacement function should be used.]) fi ]) diff --git a/m4/realloc.m4 b/m4/realloc.m4 index 5166ad4df..989d53b66 100644 --- a/m4/realloc.m4 +++ b/m4/realloc.m4 @@ -1,14 +1,9 @@ -#serial 2 +#serial 3 dnl From Jim Meyering. dnl Determine whether realloc works when both arguments are 0. dnl If it doesn't, arrange to use the replacement function. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to rpl_realloc if the replacement function should be used. */ -dnl #undef realloc -dnl AC_DEFUN(jm_FUNC_REALLOC, [ @@ -33,6 +28,7 @@ AC_DEFUN(jm_FUNC_REALLOC, ]) if test $jm_cv_func_working_realloc = no; then LIBOBJS="$LIBOBJS realloc.o" - AC_DEFINE_UNQUOTED(realloc, rpl_realloc) + AC_DEFINE_UNQUOTED(realloc, rpl_realloc, + [Define to rpl_realloc if the replacement function should be used.]) fi ]) diff --git a/m4/st_mtim.m4 b/m4/st_mtim.m4 index ed19c3d71..ec58bef31 100644 --- a/m4/st_mtim.m4 +++ b/m4/st_mtim.m4 @@ -1,4 +1,4 @@ -#serial 3 +#serial 4 dnl From Paul Eggert. @@ -24,7 +24,9 @@ AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC, CPPFLAGS="$ac_save_CPPFLAGS"]) if test $ac_cv_struct_st_mtim_nsec != no; then - AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec) + AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, + [Define to be the nanoseconds member of struct stat's st_mtim, + if it exists.]) fi ] ) diff --git a/m4/strftime.m4 b/m4/strftime.m4 index 3f105e986..fd4b6ffa5 100644 --- a/m4/strftime.m4 +++ b/m4/strftime.m4 @@ -1,4 +1,4 @@ -#serial 5 +#serial 6 dnl This macro is intended to be used solely in this file. dnl These are the prerequisite macros for GNU's strftime.c replacement. @@ -13,11 +13,6 @@ AC_DEFUN(_jm_STRFTIME_PREREQS, dnl Determine if the strftime function has all the features of the GNU one. dnl -dnl If you use this macro in a package, you should -dnl add the following two lines to acconfig.h: -dnl /* Define to gnu_strftime if the replacement function should be used. */ -dnl #undef strftime -dnl dnl From Jim Meyering. dnl AC_DEFUN(jm_FUNC_GNU_STRFTIME, @@ -139,7 +134,8 @@ changequote([, ])dnl ]) if test $jm_cv_func_working_gnu_strftime = no; then LIBOBJS="$LIBOBJS strftime.o" - AC_DEFINE_UNQUOTED(strftime, gnu_strftime) + AC_DEFINE_UNQUOTED(strftime, gnu_strftime, + [Define to gnu_strftime if the replacement function should be used.]) fi ]) -- 2.11.0