summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore1
-rw-r--r--ChangeLog20
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac (renamed from configure.in)46
-rw-r--r--lib/Makefile.am2
-rw-r--r--m4/malloc.m418
-rw-r--r--m4/realloc.m418
-rw-r--r--m4/regex.m440
-rw-r--r--m4/utmp.m42
9 files changed, 87 insertions, 62 deletions
diff --git a/.cvsignore b/.cvsignore
index 1974f7a74..a0789cb6b 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -23,3 +23,4 @@ mkinstalldirs
stamp-h
stamp-h.in
stamp-h1
+autom4te.cache
diff --git a/ChangeLog b/ChangeLog
index 217a92fe1..f852df08e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2002-08-05 Jeff Bailey <jbailey@outpost.dnsalias.org>
+
+ * lib/Makefile.am: Remove libtool hacks, automake now handles
+ LIBOBJS correctly.
+
+ * .cvsignore: Add autom4te.cache
+
+ * configure.in: Rename to ...
+ * configure.ac: ... this, and update to autoconf 2.5
+
+ * Makefile.am: Now requires Automake 1.6
+
+ * m4/malloc.m4: Update from gnulib
+
+ * m4/realloc.m4: Update from gnulib
+
+ * m4/regex.m4: Update from gnulib
+
+ * m4/utmp.m4: Change LIBOBJS to use AC_LIBOBJ
+
2002-08-05 Sergey Poznyakoff
* imap4d/version.c: New file. Support for X-VERSION command
diff --git a/Makefile.am b/Makefile.am
index 3cd47a5a8..1f3a0f387 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-AUTOMAKE_OPTIONS = gnu 1.4
+AUTOMAKE_OPTIONS = gnu 1.6
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include doc m4 lib MySql mailbox frm from pop3d imap4d \
diff --git a/configure.in b/configure.ac
index fe9d3957b..4b2afeb23 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,9 +1,12 @@
-dnl Process this file with autoconf to procude a configure script.
-AC_INIT(mailbox/mailbox.c)
-AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(mailutils, 0.0.9d)
+sdnl Process this file with autoconf to procude a configure script.
+AC_INIT([GNU Mailutils], [0.0.9d], [bug-mailutils@gnu.org])
+AC_CONFIG_SRCDIR([mailbox/mailbox.c])
+AC_CANONICAL_TARGET([])
+AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
+AC_PREREQ(2.52)
+
dnl Check for programs
AC_PROG_CC
AC_PROG_INSTALL
@@ -167,18 +170,11 @@ jm_FUNC_REALLOC
AC_FUNC_ALLOCA
jm_INCLUDED_REGEX(lib/regex.c)
-# This no-op line works around a bug in automake 1.4:
-# it doesn't recognize the assignment to LIBOBJS
-# in m4/regex.m4.
-: LIBOBJS="$LIBOBJS regex.o"
# Not use.
#AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_FNMATCH
-if test "$ac_cv_func_fnmatch_works" = "no"; then
-: LIBOBJS="$LIBOBJS fnmatch.o"
-fi
AC_REPLACE_FUNCS(fgetpwent getpass setenv snprintf strtok_r strncasecmp \
strcasecmp strsignal vasprintf strndup strnlen strchrnul)
AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim vsyslog setreuid \
@@ -189,9 +185,17 @@ MU_CHECK_UTMP
dnl Check for libraries
AC_CHECK_FUNCS(argp_parse, :,
- [LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o \
- argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o \
- argp-pvh.o argp-xinl.o"])
+ [
+ AC_LIBOBJ(argp-ba)
+ AC_LIBOBJ(argp-eexst)
+ AC_LIBOBJ(argp-fmtstream)
+ AC_LIBOBJ(argp-fs-xinl)
+ AC_LIBOBJ(argp-help)
+ AC_LIBOBJ(argp-parse)
+ AC_LIBOBJ(argp-pv)
+ AC_LIBOBJ(argp-pvh)
+ AC_LIBOBJ(argp-xinl)
+ ])
AC_MSG_CHECKING(whether extern program_invocation_name is present)
AC_TRY_COMPILE([#include <argp.h>
@@ -217,7 +221,7 @@ AC_TRY_COMPILE([#include <argp.h>
AC_CHECK_FUNCS(_obstack_begin,
[AC_DEFINE(HAVE_OBSTACK)],
- [LIBOBJS="$LIBOBJS obstack.o"])
+ [AC_LIBOBJ(obstack)])
dnl check if mysql support was added
AC_SUBST(BUILD_LIBMYSQL)
@@ -383,15 +387,8 @@ dnl get sysconfdir expanded.
CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\""
-dnl This is really UGLY! This works around a libtool/autoconf bug that only
-dnl allows LIBOBJS to contain .o, not .lo for libtool.
-LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.[[^.]]* /.lo /g;s/\.[[^.]]*$/.lo/'`
-AC_SUBST(LTLIBOBJS)
-LTALLOCA=`echo "$ALLOCA" | sed 's/\.[[^.]]* /.lo /g;s/\.[[^.]]*$/.lo/'`
-AC_SUBST(LTALLOCA)
-
dnl Output Makefiles
-AC_OUTPUT(Makefile mailutils.spec
+AC_CONFIG_FILES([Makefile mailutils.spec
include/Makefile include/mailutils/Makefile
m4/Makefile
doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile
@@ -417,5 +414,6 @@ AC_OUTPUT(Makefile mailutils.spec
mail.remote/Makefile
mh/Makefile
dotlock/Makefile
- )
+ ])
+AC_OUTPUT
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 7f3677c50..ff90481b5 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -19,5 +19,5 @@ noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h mu_dbm.h\
regex.h snprintf.h xalloc.h xstrtol.h obstack.h \
argp-fmtstream.h argp-namefrob.h argp.h mu_asprintf.h
-libmailutils_la_LIBADD = @LTLIBOBJS@ @LTALLOCA@
+libmailutils_la_LIBADD = @LIBOBJS@ @ALLOCA@
diff --git a/m4/malloc.m4 b/m4/malloc.m4
index 4978eaf6b..cb5cff3c2 100644
--- a/m4/malloc.m4
+++ b/m4/malloc.m4
@@ -1,18 +1,19 @@
-#serial 3
+#serial 6
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
-AC_DEFUN(jm_FUNC_MALLOC,
+AC_DEFUN([jm_FUNC_MALLOC],
[
dnl xmalloc.c requires that this symbol be defined so it doesn't
dnl mistakenly use a broken malloc -- as it might if this test were omitted.
- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
- [Define if the malloc check has been performed. ])
+ AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1,
+ [Define if the malloc check has been performed. ])
- AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
+ AC_CACHE_CHECK([whether malloc(0) returns a non-NULL pointer],
+ jm_cv_func_working_malloc,
[AC_TRY_RUN([
char *malloc ();
int
@@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_MALLOC,
],
jm_cv_func_working_malloc=yes,
jm_cv_func_working_malloc=no,
- dnl When crosscompiling, assume malloc is broken.
+ dnl When crosscompiling, assume malloc(0) returns NULL.
jm_cv_func_working_malloc=no)
])
if test $jm_cv_func_working_malloc = no; then
- AC_SUBST(LIBOBJS)
- LIBOBJS="$LIBOBJS malloc.$ac_objext"
- AC_DEFINE_UNQUOTED(malloc, rpl_malloc,
+ AC_LIBOBJ(malloc)
+ AC_DEFINE(malloc, rpl_malloc,
[Define to rpl_malloc if the replacement function should be used.])
fi
])
diff --git a/m4/realloc.m4 b/m4/realloc.m4
index bfbef0c16..7695e89c8 100644
--- a/m4/realloc.m4
+++ b/m4/realloc.m4
@@ -1,18 +1,19 @@
-#serial 3
+#serial 6
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
-AC_DEFUN(jm_FUNC_REALLOC,
+AC_DEFUN([jm_FUNC_REALLOC],
[
dnl xmalloc.c requires that this symbol be defined so it doesn't
dnl mistakenly use a broken realloc -- as it might if this test were omitted.
- AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
- [Define if the realloc check has been performed. ])
+ AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1,
+ [Define if the realloc check has been performed. ])
- AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
+ AC_CACHE_CHECK([whether realloc(0,0) returns a non-NULL pointer],
+ jm_cv_func_working_realloc,
[AC_TRY_RUN([
char *realloc ();
int
@@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_REALLOC,
],
jm_cv_func_working_realloc=yes,
jm_cv_func_working_realloc=no,
- dnl When crosscompiling, assume realloc is broken.
+ dnl When crosscompiling, assume realloc(0,0) returns NULL.
jm_cv_func_working_realloc=no)
])
if test $jm_cv_func_working_realloc = no; then
- AC_SUBST(LIBOBJS)
- LIBOBJS="$LIBOBJS realloc.$ac_objext"
- AC_DEFINE_UNQUOTED(realloc, rpl_realloc,
+ AC_LIBOBJ(realloc)
+ AC_DEFINE(realloc, rpl_realloc,
[Define to rpl_realloc if the replacement function should be used.])
fi
])
diff --git a/m4/regex.m4 b/m4/regex.m4
index 3012a669b..0017507ed 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,11 +1,11 @@
-#serial 5001
+#serial 12
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
dnl
-AC_DEFUN(jm_INCLUDED_REGEX,
+AC_DEFUN([jm_INCLUDED_REGEX],
[
dnl Even packages that don't use regex.c can use this macro.
dnl Of course, for them it doesn't do anything.
@@ -21,19 +21,16 @@ AC_DEFUN(jm_INCLUDED_REGEX,
AC_CACHE_CHECK([for working re_compile_pattern],
jm_cv_func_working_re_compile_pattern,
AC_TRY_RUN(
- changequote(<<, >>)dnl
- <<
-#include <stdio.h>
+[#include <stdio.h>
#include <regex.h>
int
main ()
{
static struct re_pattern_buffer regex;
const char *s;
+ struct re_registers regs;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
- /* Add this third left square bracket, [, to balance the
- three right ones below. Otherwise autoconf-2.14 chokes. */
- s = re_compile_pattern ("a[[:]:]]b\n", 9, &regex);
+ [s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, &regex);]
/* This should fail with _Invalid character class name_ error. */
if (!s)
exit (1);
@@ -41,11 +38,22 @@ AC_DEFUN(jm_INCLUDED_REGEX,
/* This should succeed, but doesn't for e.g. glibc-2.1.3. */
s = re_compile_pattern ("{1", 2, &regex);
- exit (s ? 1 : 0);
- }
- >>,
- changequote([, ])dnl
+ if (s)
+ exit (1);
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ s = re_compile_pattern ("[[anù]]*n", 7, &regex);
+ if (s)
+ exit (1);
+ /* This should match, but doesn't for e.g. glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ exit (1);
+
+ exit (0);
+ }
+ ],
jm_cv_func_working_re_compile_pattern=yes,
jm_cv_func_working_re_compile_pattern=no,
dnl When crosscompiling, assume it's broken.
@@ -55,10 +63,9 @@ AC_DEFUN(jm_INCLUDED_REGEX,
fi
test -n "$1" || AC_MSG_ERROR([missing argument])
- syscmd([test -f $1])
- ifelse(sysval, 0,
+ m4_syscmd([test -f $1])
+ ifelse(m4_sysval, 0,
[
-
AC_ARG_WITH(included-regex,
[ --without-included-regex don't compile regex; this is the default on
systems with version 2 of the GNU C library
@@ -66,8 +73,7 @@ AC_DEFUN(jm_INCLUDED_REGEX,
jm_with_regex=$withval,
jm_with_regex=$ac_use_included_regex)
if test "$jm_with_regex" = yes; then
- AC_SUBST(LIBOBJS)
- LIBOBJS="$LIBOBJS regex.$ac_objext"
+ AC_LIBOBJ(regex)
fi
],
)
diff --git a/m4/utmp.m4 b/m4/utmp.m4
index 12c500240..fe8e52915 100644
--- a/m4/utmp.m4
+++ b/m4/utmp.m4
@@ -10,5 +10,5 @@ AC_DEFUN([MU_CHECK_UTMP],
AC_DEFINE(HAVE_GETUTENT_CALLS,,
[Define if your system has the three ???utent functions]),
[if test "$ac_cv_header_utmp_h" = "yes"; then
- LIBOBJS="$LIBOBJS utmp.o"
+ AC_LIBOBJ(utmp)
fi])])

Return to:

Send suggestions and report system problems to the System administrator.