Commit 9e41ddf4 9e41ddf4260abe81b0d897e0da883bafecb57a9c by Jeff Bailey

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
1 parent 5983f6f8
......@@ -23,3 +23,4 @@ mkinstalldirs
stamp-h
stamp-h.in
stamp-h1
autom4te.cache
......
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
......
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 \
......
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
......
......@@ -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@
......
#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,
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
])
......
#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,
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
])
......
#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
],
)
......
......@@ -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])])
......