-#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) ]
)
])
-#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
])
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
])
-#serial 1
+#serial 2
dnl From Jim Meyering.
dnl
]
)
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
]
)
-#serial 1
+#serial 2
dnl From Jim Meyering.
dnl
]
)
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
]
)
-#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,
[
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
])
-#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
])
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
])
# 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])
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],
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
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
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
-#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
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
])
-#serial 2
+#serial 3
AC_DEFUN(jm_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL,
[AC_REQUIRE([jm_HEADER_TIOCGWINSZ_IN_TERMIOS_H])
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
])
# 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
[AC_TRY_LINK([#include <locale.h>], [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])
-#serial 1
+#serial 2
dnl From Jim Meyering.
dnl
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
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
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
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
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
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:
+ <sys/fstyp.h> and <sys/statfs.h>. (SVR3)])
fi
fi
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
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
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
-#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,
[
])
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
])
-#serial 2
+#serial 3
dnl A replacement for autoconf's AC_FUNC_MEMCMP that detects
dnl the losing memcmp on some x86 Next systems.
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
])
-#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,
])
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
])
-#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,
[
])
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
])
-#serial 3
+#serial 4
dnl From Paul Eggert.
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
]
)
-#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.
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,
])
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
])