summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Dalley <kevin@seti.org>2001-05-20 20:08:53 +0000
committerKevin Dalley <kevin@seti.org>2001-05-20 20:08:53 +0000
commit1221654a2e9ed701d528975612471183630122f1 (patch)
treeb2961c5bc82e6fc40586d2ba734d5225d68a5053
parented12edcae18794013b0221ff8596aac78e72d8e8 (diff)
downloadfindutils-1221654a2e9ed701d528975612471183630122f1.tar.gz
Upstream changes to files
-rw-r--r--m4/ChangeLog5
-rw-r--r--m4/Makefile.am4
-rw-r--r--m4/afs.m413
-rw-r--r--m4/check-decl.m421
-rw-r--r--m4/fnmatch.m45
-rw-r--r--m4/getline.m419
-rw-r--r--m4/glibc21.m426
-rw-r--r--m4/iconv.m439
-rw-r--r--m4/jm-glibc-io.m411
-rw-r--r--m4/jm-macros.m415
-rw-r--r--m4/largefile.m4123
-rw-r--r--m4/libintl.m4317
-rw-r--r--m4/prereq.m48
13 files changed, 451 insertions, 155 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index 4793e95b..0b76a59e 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-29 Jim Meyering <meyering@lucent.com>
+
+ * gettext.m4: Rename this...
+ * libintl.m4: ...to this.
+
2000-10-13 Kevin Dalley <kevin@seti.org>
* jm-macros.m4 (jm_MACROS): add jm_FSTYPENAME
diff --git a/m4/Makefile.am b/m4/Makefile.am
index d1a3d901..de18242f 100644
--- a/m4/Makefile.am
+++ b/m4/Makefile.am
@@ -15,13 +15,15 @@ fstypename.m4 \
getline.m4 \
gettext.m4 \
glibc.m4 \
+glibc21.m4 \
+iconv.m4 \
inttypes_h.m4 \
isc-posix.m4 \
jm-glibc-io.m4 \
jm-macros.m4 \
jm-mktime.m4 \
-largefile.m4 \
lcmessage.m4 \
+libintl.m4 \
link-follow.m4 \
ls-mntd-fs.m4 \
lstat-slash.m4 \
diff --git a/m4/afs.m4 b/m4/afs.m4
index 5153f90e..13f3bc96 100644
--- a/m4/afs.m4
+++ b/m4/afs.m4
@@ -1,7 +1,12 @@
-#serial 1
+#serial 3
AC_DEFUN(jm_AFS,
- AC_CHECKING(for AFS)
- test -d /afs \
- && AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
+ AC_MSG_CHECKING(for AFS)
+ if test -d /afs; then
+ AC_DEFINE(AFS, 1, [Define if you have the Andrew File System.])
+ ac_result=yes
+ else
+ ac_result=no
+ fi
+ AC_MSG_RESULT($ac_result)
)
diff --git a/m4/check-decl.m4 b/m4/check-decl.m4
index 14cc0019..4fe05021 100644
--- a/m4/check-decl.m4
+++ b/m4/check-decl.m4
@@ -1,4 +1,4 @@
-#serial 9, except remove memchr and nanosleep as findutils doesn't need them
+#serial 16
dnl This is just a wrapper function to encapsulate this kludge.
dnl Putting it in a separate file like this helps share it between
@@ -37,21 +37,33 @@ AC_DEFUN(jm_CHECK_DECLS,
# include <time.h>
# endif
#endif
+
+#if HAVE_UTMP_H
+# include <utmp.h>
+#endif
'
- AC_CHECK_DECLS((
+ AC_CHECK_DECLS([
free,
getenv,
geteuid,
+ getgrgid,
getlogin,
+ getpwuid,
+ getuid,
+ getutent,
lseek,
malloc,
+ memchr,
+ memrchr,
realloc,
stpcpy,
+ strndup,
+ strnlen,
strstr,
strtoul,
strtoull,
- ttyname), , , $headers)
+ ttyname], , , $headers)
])
dnl FIXME: when autoconf has support for it.
@@ -59,5 +71,6 @@ dnl This is a little helper so we can require these header checks.
AC_DEFUN(_jm_DECL_HEADERS,
[
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h)
+ AC_CHECK_HEADERS(memory.h string.h strings.h stdlib.h unistd.h sys/time.h \
+ utmp.h utmpx.h)
])
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
index c560fd2f..d4a83937 100644
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -1,4 +1,4 @@
-#serial 2
+#serial 3
dnl Determine whether to add fnmatch.o to LIBOBJS and to
dnl define fnmatch to rpl_fnmatch.
@@ -10,8 +10,7 @@ AC_DEFUN(jm_FUNC_FNMATCH,
AC_FUNC_FNMATCH
if test $ac_cv_func_fnmatch_works = no \
&& test $ac_cv_gnu_library = no; then
- AC_SUBST(LIBOBJS)
- LIBOBJS="$LIBOBJS fnmatch.$ac_objext"
+ AC_LIBOBJ(fnmatch)
AC_DEFINE_UNQUOTED(fnmatch, rpl_fnmatch,
[Define to rpl_fnmatch if the replacement function should be used.])
fi
diff --git a/m4/getline.m4 b/m4/getline.m4
index 613152c5..23f7982a 100644
--- a/m4/getline.m4
+++ b/m4/getline.m4
@@ -1,4 +1,4 @@
-#serial 3
+#serial 4
dnl See if there's a working, system-supplied version of the getline function.
dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
@@ -21,6 +21,16 @@ AC_DEFUN(AM_FUNC_GETLINE,
# if HAVE_STRING_H
# include <string.h>
# endif
+ int foo()
+ {
+ char *path;
+ size_t n;
+ FILE *stream;
+ char terminator;
+ size_t offset;
+ getstr(&path, &n, stream, terminator, offset);
+ }
+
int main ()
{ /* Based on a test program from Karl Heuer. */
char *line = NULL;
@@ -30,6 +40,8 @@ AC_DEFUN(AM_FUNC_GETLINE,
if (!in)
return 1;
len = getline (&line, &siz, in);
+ nread = getstr (&path, &pathsize, fp, '\0', count);
+
exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
}
], am_cv_func_working_getline=yes dnl The library version works.
@@ -38,8 +50,7 @@ AC_DEFUN(AM_FUNC_GETLINE,
)])
fi
- if test $am_cv_func_working_getline = yes; then
- AC_DEFINE(HAVE_GETLINE, 1,
- [Define if you have the GETLINE function.])dnl
+ if test $am_cv_func_working_getline = no; then
+ AC_LIBOBJ(getline)
fi
])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644
index 00000000..9fd45663
--- /dev/null
+++ b/m4/glibc21.m4
@@ -0,0 +1,26 @@
+#serial 2
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN(jm_GLIBC21,
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 00000000..7320bef3
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,39 @@
+#serial 1
+
+dnl From Bruno Haible.
+
+AC_DEFUN(jm_ICONV,
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable libiconv installed).
+ AC_CACHE_CHECK(for iconv, jm_cv_func_iconv, [
+ jm_cv_func_iconv="no, consider installing libiconv"
+ jm_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_func_iconv=yes)
+ if test "$jm_cv_func_iconv" != yes; then
+ jm_save_LIBS="$LIBS"
+ LIBS="$LIBS -liconv"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ jm_cv_lib_iconv=yes
+ jm_cv_func_iconv=yes)
+ LIBS="$jm_save_LIBS"
+ fi
+ ])
+ if test "$jm_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ LIBICONV=
+ if test "$jm_cv_lib_iconv" = yes; then
+ LIBICONV="-liconv"
+ fi
+ AC_SUBST(LIBICONV)
+])
diff --git a/m4/jm-glibc-io.m4 b/m4/jm-glibc-io.m4
index e2423cd6..d485b103 100644
--- a/m4/jm-glibc-io.m4
+++ b/m4/jm-glibc-io.m4
@@ -1,4 +1,4 @@
-#serial 3
+#serial 4
dnl From Jim Meyering.
dnl
@@ -8,6 +8,13 @@ dnl
AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
[
+ # Kludge (not executed) to make autoheader do the right thing.
+ if test a = b; then
+ AC_CHECK_DECLS([clearerr_unlocked, feof_unlocked, ferror_unlocked,
+ fflush_unlocked, fputc_unlocked, fread_unlocked, fwrite_unlocked,
+ getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked])
+ fi
+
io_functions='clearerr_unlocked feof_unlocked ferror_unlocked
fflush_unlocked fputc_unlocked fread_unlocked fwrite_unlocked
getc_unlocked getchar_unlocked putc_unlocked putchar_unlocked'
@@ -16,7 +23,7 @@ AC_DEFUN(jm_FUNC_GLIBC_UNLOCKED_IO,
# Otherwise, we'd get the Solaris5.5.1 functions that are not
# declared, and that have been removed from Solaris5.6. The resulting
# 5.5.1 binaries would not run on 5.6 due to shared library differences.
- AC_CHECK_DECLS(($jm_io_func),
+ AC_CHECK_DECLS([$jm_io_func],
jm_declared=yes,
jm_declared=no,
[#include <stdio.h>])
diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 16bebc8f..4bbad523 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
@@ -72,7 +72,7 @@ AC_DEFUN(jm_MACROS,
AC_REQUIRE([jm_FUNC_STAT])
AC_REQUIRE([jm_FUNC_REALLOC])
AC_REQUIRE([jm_FUNC_MALLOC])
- AC_REQUIRE([jm_FUNC_STRERROR_R])
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
AC_REQUIRE([jm_FUNC_READDIR])
AC_REQUIRE([jm_FUNC_MEMCMP])
AC_REQUIRE([jm_FUNC_GLIBC_UNLOCKED_IO])
@@ -108,13 +108,6 @@ AC_DEFUN(jm_MACROS,
dnl ...: warning: AC_TRY_RUN called without default to allow cross compiling
AC_FUNC_SETVBUF_REVERSED
- # used by sleep and shred
- # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
- # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- AC_SEARCH_LIBS(clock_gettime, [rt posix4])
- AC_CHECK_FUNCS(clock_gettime)
- AC_CHECK_FUNCS(gettimeofday)
-
AC_CHECK_FUNCS(getdelim)
AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
@@ -128,7 +121,6 @@ AC_DEFUN(jm_MACROS,
fdatasync \
fseeko \
ftime \
- ftruncate \
getcwd \
gethrtime \
getmntinfo \
@@ -154,6 +146,9 @@ AC_DEFUN(jm_MACROS,
AC_CHECK_FUNCS(getdelim)
fi
+ jm_GLIBC21
+ jm_ICONV
+
# These tests are for df.
jm_FSTYPENAME
@@ -171,7 +166,7 @@ AC_DEFUN(jm_CHECK_ALL_TYPES,
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_MEMBERS((struct stat.st_blksize),,,[$ac_includes_default
+ AC_CHECK_MEMBERS([struct stat.st_blksize],,,[$ac_includes_default
#include <sys/stat.h>
])
AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
diff --git a/m4/largefile.m4 b/m4/largefile.m4
deleted file mode 100644
index 32d27ccb..00000000
--- a/m4/largefile.m4
+++ /dev/null
@@ -1,123 +0,0 @@
-#serial 8
-
-dnl By default, many hosts won't let programs access large files;
-dnl one must use special compiler options to get large-file access to work.
-dnl For more details about this brain damage please see:
-dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
-
-dnl Written by Paul Eggert <eggert@twinsun.com>.
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
-AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
- [AC_CACHE_CHECK([for $1 value to request large file support],
- ac_cv_sys_largefile_$1,
- [if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
- then
- ac_cv_sys_largefile_$1=`cat conftest.1`
- else
- ac_cv_sys_largefile_$1=no
- ifelse($1, CFLAGS,
- [case "$host_os" in
- # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
-[ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)]
- if test "$GCC" = yes; then
- ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
- fi
- ;;
- # IRIX 6.2 and later require cc -n32.
-[ irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)]
- if test "$GCC" != yes; then
- ac_cv_sys_largefile_CFLAGS=-n32
- fi
- esac
- if test "$ac_cv_sys_largefile_CFLAGS" != no; then
- ac_save_CC="$CC"
- CC="$CC $ac_cv_sys_largefile_CFLAGS"
- AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
- CC="$ac_save_CC"
- fi])
- fi
- rm -f conftest*])])
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
-AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
- [case $2 in
- no) ;;
- ?*)
- case "[$]$1" in
- '') $1=$2 ;;
- *) $1=[$]$1' '$2 ;;
- esac ;;
- esac])
-
-dnl Internal subroutine of AC_SYS_LARGEFILE.
-dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
-AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
- [AC_CACHE_CHECK([for $1], $2,
- [$2=no
- $4
- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
- case "$ac_flag" in
- -D$1)
- $2=1 ;;
- -D$1=*)
- $2=`expr " $ac_flag" : '[[^=]]*=\(.*\)'` ;;
- esac
- done
- ])
- if test "[$]$2" != no; then
- AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
- fi])
-
-AC_DEFUN(AC_SYS_LARGEFILE,
- [AC_REQUIRE([AC_CANONICAL_HOST])
- AC_ARG_ENABLE(largefile,
- [ --disable-largefile omit support for large files])
- if test "$enable_largefile" != no; then
- AC_CHECK_TOOL(GETCONF, getconf)
- AC_SYS_LARGEFILE_FLAGS(CFLAGS)
- AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
- AC_SYS_LARGEFILE_FLAGS(LIBS)
-
- for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
- case "$ac_flag" in
- no) ;;
- -D_FILE_OFFSET_BITS=*) ;;
- -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
- -D_LARGE_FILES | -D_LARGE_FILES=*) ;;
- -D?* | -I?*)
- AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
- *)
- AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
- esac
- done
- AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
- AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
- AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
- ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.],
- [case "$host_os" in
- # HP-UX 10.20 and later
-[ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)]
- ac_cv_sys_file_offset_bits=64 ;;
- esac])
- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
- ac_cv_sys_largefile_source,
- [Define to make fseeko etc. visible, on some hosts.],
- [case "$host_os" in
- # HP-UX 10.20 and later
-[ hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)]
- ac_cv_sys_largefile_source=1 ;;
- esac])
- AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
- ac_cv_sys_large_files,
- [Define for large files, on AIX-style hosts.],
- [case "$host_os" in
- # AIX 4.2 and later
-[ aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)]
- ac_cv_sys_large_files=1 ;;
- esac])
- fi
- ])
diff --git a/m4/libintl.m4 b/m4/libintl.m4
new file mode 100644
index 00000000..3c68b52b
--- /dev/null
+++ b/m4/libintl.m4
@@ -0,0 +1,317 @@
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 109
+
+AC_PREREQ(2.13) dnl Minimum Autoconf version required.
+
+AC_DEFUN(AM_WITH_NLS,
+ [AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+
+ USE_INCLUDED_LIBINTL=no
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ 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],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If gettext or catgets are available (in this order) we
+ dnl use this. Else we have to fall back to GNU NLS library.
+ dnl catgets is only used if permitted by option --with-catgets.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+ CATOBJEXT=NONE
+
+ AC_CHECK_HEADER(libintl.h,
+ [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
+ gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
+
+ if test "$gt_cv_func_gettext_libc" != "yes"; then
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, gettext)])
+ fi
+
+ if test "$gt_cv_func_gettext_libc" = "yes" \
+ || test "$ac_cv_lib_intl_gettext" = "yes"; then
+ 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
+ AC_CHECK_FUNCS(dcgettext)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ INSTOBJEXT=.mo
+ fi
+ fi
+ ])
+
+ if test "$CATOBJEXT" = "NONE"; then
+ AC_MSG_CHECKING([whether catgets can be used])
+ AC_ARG_WITH(catgets,
+ [ --with-catgets use catgets functions if available],
+ nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
+ AC_MSG_RESULT($nls_cv_use_catgets)
+
+ if test "$nls_cv_use_catgets" = "yes"; then
+ dnl No gettext in C library. Try catgets next.
+ AC_CHECK_LIB(i, main)
+ AC_CHECK_FUNC(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_PATH_PROG(GMSGFMT, gmsgfmt, no)
+ if test "$GMSGFMT" = "no"; then
+ AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
+ fi
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.cat
+ INSTOBJEXT=.cat
+ DATADIRNAME=lib
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi])
+ fi
+ fi
+
+ if test "$CATOBJEXT" = "NONE"; then
+ dnl Neither gettext nor catgets in included in the C library.
+ dnl Fall back on GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_SUBST(MSGFMT)
+ USE_INCLUDED_LIBINTL=yes
+ CATOBJEXT=.gmo
+ INSTOBJEXT=.mo
+ DATADIRNAME=share
+ INTLDEPS='$(top_builddir)/intl/libintl.a'
+ INTLLIBS=$INTLDEPS
+ LIBS=`echo $LIBS | sed -e 's/-lintl//'`
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+ else
+ DATADIRNAME=share
+ nls_cv_header_intl=intl/libintl.h
+ nls_cv_header_libgt=intl/libgettext.h
+ fi
+ if test -z "$nls_cv_header_intl"; then
+ # Clean out junk possibly left behind by a previous configuration.
+ rm -f intl/libintl.h
+ fi
+ AC_CONFIG_LINKS($nls_cv_header_intl:$nls_cv_header_libgt)
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+
+ # If this is used in GNU gettext we have to set USE_NLS to `yes'
+ # because some of the sources are only built for this goal.
+ if test "$PACKAGE" = gettext; then
+ USE_NLS=yes
+ USE_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLDEPS)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(INTLOBJS)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+AC_DEFUN(AM_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+strdup __argz_count __argz_stringify __argz_next])
+
+ if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ AC_CHECK_FUNCS(stpcpy)
+ fi
+ if test "${ac_cv_func_stpcpy}" = "yes"; then
+ AC_DEFINE(HAVE_STPCPY, 1, [Define to 1 if you have the stpcpy function.])
+ fi
+
+ AM_LC_MESSAGES
+ AM_WITH_NLS
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl The reference to <locale.h> in the installed <libintl.h> file
+ dnl must be resolved because we cannot expect the users of this
+ dnl to define HAVE_LOCALE_H.
+ if test $ac_cv_header_locale_h = yes; then
+ INCLUDE_LOCALE_H="#include <locale.h>"
+ else
+ INCLUDE_LOCALE_H="\
+/* The system does not provide the header <locale.h>. Take care yourself. */"
+ fi
+ AC_SUBST(INCLUDE_LOCALE_H)
+
+ dnl Determine which catalog format we have (if any is needed)
+ dnl For now we know about two different formats:
+ dnl Linux libc-5 and the normal X/Open format
+ test -d intl || mkdir intl
+ if test "$CATOBJEXT" = ".cat"; then
+ AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
+
+ dnl Transform the SED scripts while copying because some dumb SEDs
+ dnl cannot handle comments.
+ sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
+ fi
+ dnl po2tbl.sed is always needed.
+ sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
+ $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
+
+ dnl In the intl/Makefile.in we have a special dependency which makes
+ dnl only sense for gettext. We comment this out for non-gettext
+ dnl packages.
+ if test "$PACKAGE" = "gettext"; then
+ GT_NO="#NO#"
+ GT_YES=
+ else
+ GT_NO=
+ GT_YES="#YES#"
+ fi
+ AC_SUBST(GT_NO)
+ AC_SUBST(GT_YES)
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate it.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl *** For now the libtool support in intl/Makefile is not for real.
+ l=
+ AC_SUBST(l)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ case "$srcdir" in
+ .)
+ posrcprefix="../" ;;
+ /* | [[A-Za-z]]:*)
+ posrcprefix="$srcdir/" ;;
+ *)
+ posrcprefix="../$srcdir/" ;;
+ esac
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
diff --git a/m4/prereq.m4 b/m4/prereq.m4
index e686358f..d05b7310 100644
--- a/m4/prereq.m4
+++ b/m4/prereq.m4
@@ -62,10 +62,10 @@ $ac_includes_default
# include <utmp.h>
#endif
"
- AC_CHECK_MEMBERS((struct utmpx.ut_user),,,[$utmp_includes])
- AC_CHECK_MEMBERS((struct utmp.ut_user),,,[$utmp_includes])
- AC_CHECK_MEMBERS((struct utmpx.ut_name),,,[$utmp_includes])
- AC_CHECK_MEMBERS((struct utmp.ut_name),,,[$utmp_includes])
+ AC_CHECK_MEMBERS([struct utmpx.ut_user],,,[$utmp_includes])
+ AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes])
+ AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes])
+ AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes])
])
AC_DEFUN(jm_PREREQ_REGEX,