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
Showing
9 changed files
with
87 additions
and
62 deletions
1 | 2002-08-05 Jeff Bailey <jbailey@outpost.dnsalias.org> | ||
2 | |||
3 | * lib/Makefile.am: Remove libtool hacks, automake now handles | ||
4 | LIBOBJS correctly. | ||
5 | |||
6 | * .cvsignore: Add autom4te.cache | ||
7 | |||
8 | * configure.in: Rename to ... | ||
9 | * configure.ac: ... this, and update to autoconf 2.5 | ||
10 | |||
11 | * Makefile.am: Now requires Automake 1.6 | ||
12 | |||
13 | * m4/malloc.m4: Update from gnulib | ||
14 | |||
15 | * m4/realloc.m4: Update from gnulib | ||
16 | |||
17 | * m4/regex.m4: Update from gnulib | ||
18 | |||
19 | * m4/utmp.m4: Change LIBOBJS to use AC_LIBOBJ | ||
20 | |||
1 | 2002-08-05 Sergey Poznyakoff | 21 | 2002-08-05 Sergey Poznyakoff |
2 | 22 | ||
3 | * imap4d/version.c: New file. Support for X-VERSION command | 23 | * imap4d/version.c: New file. Support for X-VERSION command | ... | ... |
1 | dnl Process this file with autoconf to procude a configure script. | 1 | sdnl Process this file with autoconf to procude a configure script. |
2 | AC_INIT(mailbox/mailbox.c) | 2 | AC_INIT([GNU Mailutils], [0.0.9d], [bug-mailutils@gnu.org]) |
3 | AC_CANONICAL_SYSTEM | 3 | AC_CONFIG_SRCDIR([mailbox/mailbox.c]) |
4 | AM_INIT_AUTOMAKE(mailutils, 0.0.9d) | 4 | AC_CANONICAL_TARGET([]) |
5 | AM_INIT_AUTOMAKE | ||
5 | AM_CONFIG_HEADER(config.h) | 6 | AM_CONFIG_HEADER(config.h) |
6 | 7 | ||
8 | AC_PREREQ(2.52) | ||
9 | |||
7 | dnl Check for programs | 10 | dnl Check for programs |
8 | AC_PROG_CC | 11 | AC_PROG_CC |
9 | AC_PROG_INSTALL | 12 | AC_PROG_INSTALL |
... | @@ -167,18 +170,11 @@ jm_FUNC_REALLOC | ... | @@ -167,18 +170,11 @@ jm_FUNC_REALLOC |
167 | AC_FUNC_ALLOCA | 170 | AC_FUNC_ALLOCA |
168 | 171 | ||
169 | jm_INCLUDED_REGEX(lib/regex.c) | 172 | jm_INCLUDED_REGEX(lib/regex.c) |
170 | # This no-op line works around a bug in automake 1.4: | ||
171 | # it doesn't recognize the assignment to LIBOBJS | ||
172 | # in m4/regex.m4. | ||
173 | : LIBOBJS="$LIBOBJS regex.o" | ||
174 | 173 | ||
175 | # Not use. | 174 | # Not use. |
176 | #AC_FUNC_MEMCMP | 175 | #AC_FUNC_MEMCMP |
177 | AC_FUNC_MMAP | 176 | AC_FUNC_MMAP |
178 | AC_FUNC_FNMATCH | 177 | AC_FUNC_FNMATCH |
179 | if test "$ac_cv_func_fnmatch_works" = "no"; then | ||
180 | : LIBOBJS="$LIBOBJS fnmatch.o" | ||
181 | fi | ||
182 | AC_REPLACE_FUNCS(fgetpwent getpass setenv snprintf strtok_r strncasecmp \ | 178 | AC_REPLACE_FUNCS(fgetpwent getpass setenv snprintf strtok_r strncasecmp \ |
183 | strcasecmp strsignal vasprintf strndup strnlen strchrnul) | 179 | strcasecmp strsignal vasprintf strndup strnlen strchrnul) |
184 | AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim vsyslog setreuid \ | 180 | AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim vsyslog setreuid \ |
... | @@ -189,9 +185,17 @@ MU_CHECK_UTMP | ... | @@ -189,9 +185,17 @@ MU_CHECK_UTMP |
189 | 185 | ||
190 | dnl Check for libraries | 186 | dnl Check for libraries |
191 | AC_CHECK_FUNCS(argp_parse, :, | 187 | AC_CHECK_FUNCS(argp_parse, :, |
192 | [LIBOBJS="$LIBOBJS argp-ba.o argp-eexst.o argp-fmtstream.o \ | 188 | [ |
193 | argp-fs-xinl.o argp-help.o argp-parse.o argp-pv.o \ | 189 | AC_LIBOBJ(argp-ba) |
194 | argp-pvh.o argp-xinl.o"]) | 190 | AC_LIBOBJ(argp-eexst) |
191 | AC_LIBOBJ(argp-fmtstream) | ||
192 | AC_LIBOBJ(argp-fs-xinl) | ||
193 | AC_LIBOBJ(argp-help) | ||
194 | AC_LIBOBJ(argp-parse) | ||
195 | AC_LIBOBJ(argp-pv) | ||
196 | AC_LIBOBJ(argp-pvh) | ||
197 | AC_LIBOBJ(argp-xinl) | ||
198 | ]) | ||
195 | 199 | ||
196 | AC_MSG_CHECKING(whether extern program_invocation_name is present) | 200 | AC_MSG_CHECKING(whether extern program_invocation_name is present) |
197 | AC_TRY_COMPILE([#include <argp.h> | 201 | AC_TRY_COMPILE([#include <argp.h> |
... | @@ -217,7 +221,7 @@ AC_TRY_COMPILE([#include <argp.h> | ... | @@ -217,7 +221,7 @@ AC_TRY_COMPILE([#include <argp.h> |
217 | 221 | ||
218 | AC_CHECK_FUNCS(_obstack_begin, | 222 | AC_CHECK_FUNCS(_obstack_begin, |
219 | [AC_DEFINE(HAVE_OBSTACK)], | 223 | [AC_DEFINE(HAVE_OBSTACK)], |
220 | [LIBOBJS="$LIBOBJS obstack.o"]) | 224 | [AC_LIBOBJ(obstack)]) |
221 | 225 | ||
222 | dnl check if mysql support was added | 226 | dnl check if mysql support was added |
223 | AC_SUBST(BUILD_LIBMYSQL) | 227 | AC_SUBST(BUILD_LIBMYSQL) |
... | @@ -383,15 +387,8 @@ dnl get sysconfdir expanded. | ... | @@ -383,15 +387,8 @@ dnl get sysconfdir expanded. |
383 | 387 | ||
384 | CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\"" | 388 | CPPFLAGS="$CPPFLAGS -DSYSCONFDIR=\\\"\$(sysconfdir)\\\"" |
385 | 389 | ||
386 | dnl This is really UGLY! This works around a libtool/autoconf bug that only | ||
387 | dnl allows LIBOBJS to contain .o, not .lo for libtool. | ||
388 | LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.[[^.]]* /.lo /g;s/\.[[^.]]*$/.lo/'` | ||
389 | AC_SUBST(LTLIBOBJS) | ||
390 | LTALLOCA=`echo "$ALLOCA" | sed 's/\.[[^.]]* /.lo /g;s/\.[[^.]]*$/.lo/'` | ||
391 | AC_SUBST(LTALLOCA) | ||
392 | |||
393 | dnl Output Makefiles | 390 | dnl Output Makefiles |
394 | AC_OUTPUT(Makefile mailutils.spec | 391 | AC_CONFIG_FILES([Makefile mailutils.spec |
395 | include/Makefile include/mailutils/Makefile | 392 | include/Makefile include/mailutils/Makefile |
396 | m4/Makefile | 393 | m4/Makefile |
397 | doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile | 394 | doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile |
... | @@ -417,5 +414,6 @@ AC_OUTPUT(Makefile mailutils.spec | ... | @@ -417,5 +414,6 @@ AC_OUTPUT(Makefile mailutils.spec |
417 | mail.remote/Makefile | 414 | mail.remote/Makefile |
418 | mh/Makefile | 415 | mh/Makefile |
419 | dotlock/Makefile | 416 | dotlock/Makefile |
420 | ) | 417 | ]) |
418 | AC_OUTPUT | ||
421 | 419 | ... | ... |
... | @@ -19,5 +19,5 @@ noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h mu_dbm.h\ | ... | @@ -19,5 +19,5 @@ noinst_HEADERS = argcv.h error.h fnmatch.h getline.h getopt.h md5.h mu_dbm.h\ |
19 | regex.h snprintf.h xalloc.h xstrtol.h obstack.h \ | 19 | regex.h snprintf.h xalloc.h xstrtol.h obstack.h \ |
20 | argp-fmtstream.h argp-namefrob.h argp.h mu_asprintf.h | 20 | argp-fmtstream.h argp-namefrob.h argp.h mu_asprintf.h |
21 | 21 | ||
22 | libmailutils_la_LIBADD = @LTLIBOBJS@ @LTALLOCA@ | 22 | libmailutils_la_LIBADD = @LIBOBJS@ @ALLOCA@ |
23 | 23 | ... | ... |
1 | #serial 3 | 1 | #serial 6 |
2 | 2 | ||
3 | dnl From Jim Meyering. | 3 | dnl From Jim Meyering. |
4 | dnl Determine whether malloc accepts 0 as its argument. | 4 | dnl Determine whether malloc accepts 0 as its argument. |
5 | dnl If it doesn't, arrange to use the replacement function. | 5 | dnl If it doesn't, arrange to use the replacement function. |
6 | dnl | 6 | dnl |
7 | 7 | ||
8 | AC_DEFUN(jm_FUNC_MALLOC, | 8 | AC_DEFUN([jm_FUNC_MALLOC], |
9 | [ | 9 | [ |
10 | dnl xmalloc.c requires that this symbol be defined so it doesn't | 10 | dnl xmalloc.c requires that this symbol be defined so it doesn't |
11 | dnl mistakenly use a broken malloc -- as it might if this test were omitted. | 11 | dnl mistakenly use a broken malloc -- as it might if this test were omitted. |
12 | AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_MALLOC_CHECK, 1, | 12 | AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1, |
13 | [Define if the malloc check has been performed. ]) | 13 | [Define if the malloc check has been performed. ]) |
14 | 14 | ||
15 | AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc, | 15 | AC_CACHE_CHECK([whether malloc(0) returns a non-NULL pointer], |
16 | jm_cv_func_working_malloc, | ||
16 | [AC_TRY_RUN([ | 17 | [AC_TRY_RUN([ |
17 | char *malloc (); | 18 | char *malloc (); |
18 | int | 19 | int |
... | @@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_MALLOC, | ... | @@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_MALLOC, |
23 | ], | 24 | ], |
24 | jm_cv_func_working_malloc=yes, | 25 | jm_cv_func_working_malloc=yes, |
25 | jm_cv_func_working_malloc=no, | 26 | jm_cv_func_working_malloc=no, |
26 | dnl When crosscompiling, assume malloc is broken. | 27 | dnl When crosscompiling, assume malloc(0) returns NULL. |
27 | jm_cv_func_working_malloc=no) | 28 | jm_cv_func_working_malloc=no) |
28 | ]) | 29 | ]) |
29 | if test $jm_cv_func_working_malloc = no; then | 30 | if test $jm_cv_func_working_malloc = no; then |
30 | AC_SUBST(LIBOBJS) | 31 | AC_LIBOBJ(malloc) |
31 | LIBOBJS="$LIBOBJS malloc.$ac_objext" | 32 | AC_DEFINE(malloc, rpl_malloc, |
32 | AC_DEFINE_UNQUOTED(malloc, rpl_malloc, | ||
33 | [Define to rpl_malloc if the replacement function should be used.]) | 33 | [Define to rpl_malloc if the replacement function should be used.]) |
34 | fi | 34 | fi |
35 | ]) | 35 | ]) | ... | ... |
1 | #serial 3 | 1 | #serial 6 |
2 | 2 | ||
3 | dnl From Jim Meyering. | 3 | dnl From Jim Meyering. |
4 | dnl Determine whether realloc works when both arguments are 0. | 4 | dnl Determine whether realloc works when both arguments are 0. |
5 | dnl If it doesn't, arrange to use the replacement function. | 5 | dnl If it doesn't, arrange to use the replacement function. |
6 | dnl | 6 | dnl |
7 | 7 | ||
8 | AC_DEFUN(jm_FUNC_REALLOC, | 8 | AC_DEFUN([jm_FUNC_REALLOC], |
9 | [ | 9 | [ |
10 | dnl xmalloc.c requires that this symbol be defined so it doesn't | 10 | dnl xmalloc.c requires that this symbol be defined so it doesn't |
11 | dnl mistakenly use a broken realloc -- as it might if this test were omitted. | 11 | dnl mistakenly use a broken realloc -- as it might if this test were omitted. |
12 | AC_DEFINE_UNQUOTED(HAVE_DONE_WORKING_REALLOC_CHECK, 1, | 12 | AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1, |
13 | [Define if the realloc check has been performed. ]) | 13 | [Define if the realloc check has been performed. ]) |
14 | 14 | ||
15 | AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc, | 15 | AC_CACHE_CHECK([whether realloc(0,0) returns a non-NULL pointer], |
16 | jm_cv_func_working_realloc, | ||
16 | [AC_TRY_RUN([ | 17 | [AC_TRY_RUN([ |
17 | char *realloc (); | 18 | char *realloc (); |
18 | int | 19 | int |
... | @@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_REALLOC, | ... | @@ -23,13 +24,12 @@ AC_DEFUN(jm_FUNC_REALLOC, |
23 | ], | 24 | ], |
24 | jm_cv_func_working_realloc=yes, | 25 | jm_cv_func_working_realloc=yes, |
25 | jm_cv_func_working_realloc=no, | 26 | jm_cv_func_working_realloc=no, |
26 | dnl When crosscompiling, assume realloc is broken. | 27 | dnl When crosscompiling, assume realloc(0,0) returns NULL. |
27 | jm_cv_func_working_realloc=no) | 28 | jm_cv_func_working_realloc=no) |
28 | ]) | 29 | ]) |
29 | if test $jm_cv_func_working_realloc = no; then | 30 | if test $jm_cv_func_working_realloc = no; then |
30 | AC_SUBST(LIBOBJS) | 31 | AC_LIBOBJ(realloc) |
31 | LIBOBJS="$LIBOBJS realloc.$ac_objext" | 32 | AC_DEFINE(realloc, rpl_realloc, |
32 | AC_DEFINE_UNQUOTED(realloc, rpl_realloc, | ||
33 | [Define to rpl_realloc if the replacement function should be used.]) | 33 | [Define to rpl_realloc if the replacement function should be used.]) |
34 | fi | 34 | fi |
35 | ]) | 35 | ]) | ... | ... |
1 | #serial 5001 | 1 | #serial 12 |
2 | 2 | ||
3 | dnl Initially derived from code in GNU grep. | 3 | dnl Initially derived from code in GNU grep. |
4 | dnl Mostly written by Jim Meyering. | 4 | dnl Mostly written by Jim Meyering. |
5 | 5 | ||
6 | dnl Usage: jm_INCLUDED_REGEX([lib/regex.c]) | 6 | dnl Usage: jm_INCLUDED_REGEX([lib/regex.c]) |
7 | dnl | 7 | dnl |
8 | AC_DEFUN(jm_INCLUDED_REGEX, | 8 | AC_DEFUN([jm_INCLUDED_REGEX], |
9 | [ | 9 | [ |
10 | dnl Even packages that don't use regex.c can use this macro. | 10 | dnl Even packages that don't use regex.c can use this macro. |
11 | dnl Of course, for them it doesn't do anything. | 11 | dnl Of course, for them it doesn't do anything. |
... | @@ -21,19 +21,16 @@ AC_DEFUN(jm_INCLUDED_REGEX, | ... | @@ -21,19 +21,16 @@ AC_DEFUN(jm_INCLUDED_REGEX, |
21 | AC_CACHE_CHECK([for working re_compile_pattern], | 21 | AC_CACHE_CHECK([for working re_compile_pattern], |
22 | jm_cv_func_working_re_compile_pattern, | 22 | jm_cv_func_working_re_compile_pattern, |
23 | AC_TRY_RUN( | 23 | AC_TRY_RUN( |
24 | changequote(<<, >>)dnl | 24 | [#include <stdio.h> |
25 | << | ||
26 | #include <stdio.h> | ||
27 | #include <regex.h> | 25 | #include <regex.h> |
28 | int | 26 | int |
29 | main () | 27 | main () |
30 | { | 28 | { |
31 | static struct re_pattern_buffer regex; | 29 | static struct re_pattern_buffer regex; |
32 | const char *s; | 30 | const char *s; |
31 | struct re_registers regs; | ||
33 | re_set_syntax (RE_SYNTAX_POSIX_EGREP); | 32 | re_set_syntax (RE_SYNTAX_POSIX_EGREP); |
34 | /* Add this third left square bracket, [, to balance the | 33 | [s = re_compile_pattern ("a[[:@:>@:]]b\n", 9, ®ex);] |
35 | three right ones below. Otherwise autoconf-2.14 chokes. */ | ||
36 | s = re_compile_pattern ("a[[:]:]]b\n", 9, ®ex); | ||
37 | /* This should fail with _Invalid character class name_ error. */ | 34 | /* This should fail with _Invalid character class name_ error. */ |
38 | if (!s) | 35 | if (!s) |
39 | exit (1); | 36 | exit (1); |
... | @@ -41,11 +38,22 @@ AC_DEFUN(jm_INCLUDED_REGEX, | ... | @@ -41,11 +38,22 @@ AC_DEFUN(jm_INCLUDED_REGEX, |
41 | /* This should succeed, but doesn't for e.g. glibc-2.1.3. */ | 38 | /* This should succeed, but doesn't for e.g. glibc-2.1.3. */ |
42 | s = re_compile_pattern ("{1", 2, ®ex); | 39 | s = re_compile_pattern ("{1", 2, ®ex); |
43 | 40 | ||
44 | exit (s ? 1 : 0); | 41 | if (s) |
45 | } | 42 | exit (1); |
46 | >>, | 43 | |
47 | changequote([, ])dnl | 44 | /* The following example is derived from a problem report |
45 | against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */ | ||
46 | s = re_compile_pattern ("[[anù]]*n", 7, ®ex); | ||
47 | if (s) | ||
48 | exit (1); | ||
48 | 49 | ||
50 | /* This should match, but doesn't for e.g. glibc-2.2.1. */ | ||
51 | if (re_match (®ex, "an", 2, 0, ®s) != 2) | ||
52 | exit (1); | ||
53 | |||
54 | exit (0); | ||
55 | } | ||
56 | ], | ||
49 | jm_cv_func_working_re_compile_pattern=yes, | 57 | jm_cv_func_working_re_compile_pattern=yes, |
50 | jm_cv_func_working_re_compile_pattern=no, | 58 | jm_cv_func_working_re_compile_pattern=no, |
51 | dnl When crosscompiling, assume it's broken. | 59 | dnl When crosscompiling, assume it's broken. |
... | @@ -55,10 +63,9 @@ AC_DEFUN(jm_INCLUDED_REGEX, | ... | @@ -55,10 +63,9 @@ AC_DEFUN(jm_INCLUDED_REGEX, |
55 | fi | 63 | fi |
56 | 64 | ||
57 | test -n "$1" || AC_MSG_ERROR([missing argument]) | 65 | test -n "$1" || AC_MSG_ERROR([missing argument]) |
58 | syscmd([test -f $1]) | 66 | m4_syscmd([test -f $1]) |
59 | ifelse(sysval, 0, | 67 | ifelse(m4_sysval, 0, |
60 | [ | 68 | [ |
61 | |||
62 | AC_ARG_WITH(included-regex, | 69 | AC_ARG_WITH(included-regex, |
63 | [ --without-included-regex don't compile regex; this is the default on | 70 | [ --without-included-regex don't compile regex; this is the default on |
64 | systems with version 2 of the GNU C library | 71 | systems with version 2 of the GNU C library |
... | @@ -66,8 +73,7 @@ AC_DEFUN(jm_INCLUDED_REGEX, | ... | @@ -66,8 +73,7 @@ AC_DEFUN(jm_INCLUDED_REGEX, |
66 | jm_with_regex=$withval, | 73 | jm_with_regex=$withval, |
67 | jm_with_regex=$ac_use_included_regex) | 74 | jm_with_regex=$ac_use_included_regex) |
68 | if test "$jm_with_regex" = yes; then | 75 | if test "$jm_with_regex" = yes; then |
69 | AC_SUBST(LIBOBJS) | 76 | AC_LIBOBJ(regex) |
70 | LIBOBJS="$LIBOBJS regex.$ac_objext" | ||
71 | fi | 77 | fi |
72 | ], | 78 | ], |
73 | ) | 79 | ) | ... | ... |
... | @@ -10,5 +10,5 @@ AC_DEFUN([MU_CHECK_UTMP], | ... | @@ -10,5 +10,5 @@ AC_DEFUN([MU_CHECK_UTMP], |
10 | AC_DEFINE(HAVE_GETUTENT_CALLS,, | 10 | AC_DEFINE(HAVE_GETUTENT_CALLS,, |
11 | [Define if your system has the three ???utent functions]), | 11 | [Define if your system has the three ???utent functions]), |
12 | [if test "$ac_cv_header_utmp_h" = "yes"; then | 12 | [if test "$ac_cv_header_utmp_h" = "yes"; then |
13 | LIBOBJS="$LIBOBJS utmp.o" | 13 | AC_LIBOBJ(utmp) |
14 | fi])]) | 14 | fi])]) | ... | ... |
-
Please register or sign in to post a comment