Commit 772d86ed 772d86eda16f6f09e9d8709d1d42570d63fce5ba by Sergey Poznyakoff

Use MU_HEADER and MU_FINISH_LINKS where needed

1 parent 60c18442
......@@ -248,7 +248,7 @@ AC_MSG_RESULT($log_facility)
dnl Check for headers
AC_HEADER_STDC
AC_HEADER_DIRENT
AC_CHECK_HEADERS(argp.h errno.h fcntl.h getopt.h inttypes.h libgen.h limits.h\
AC_CHECK_HEADERS(errno.h fcntl.h getopt.h inttypes.h libgen.h limits.h\
malloc.h obstack.h paths.h shadow.h socket.h sys/socket.h stdarg.h stdio.h\
stdlib.h string.h strings.h sys/file.h sysexits.h syslog.h termcap.h\
termios.h termio.h sgtty.h utmp.h utmpx.h unistd.h)
......@@ -293,7 +293,7 @@ AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_ALLOCA
jm_INCLUDED_REGEX(lib/regex.c)
jm_INCLUDED_REGEX(mailbox/regex.c)
# Not use.
#AC_FUNC_MEMCMP
......@@ -346,7 +346,10 @@ AC_ARG_WITH([included-argp],
AC_HELP_STRING([--with-included-argp],
[Use included argp library]),
[USE_INCLUDED_ARGP=${withval}],
[AC_CHECK_FUNCS(argp_parse, :, [USE_INCLUDED_ARGP=yes])])
[AC_CHECK_HEADER(argp.h,
[AC_CHECK_FUNCS(argp_parse, :,
[USE_INCLUDED_ARGP=yes])],
[USE_INCLUDED_ARGP=yes])])
if test "$USE_INCLUDED_ARGP" = yes; then
MU_LIBOBJ(argp-ba)
......@@ -359,6 +362,7 @@ if test "$USE_INCLUDED_ARGP" = yes; then
MU_LIBOBJ(argp-pvh)
MU_LIBOBJ(argp-xinl)
MU_LIBOBJ(pin)
MU_HEADER(argp.h)
fi
AC_MSG_CHECKING(whether extern program_invocation_name is present)
......@@ -709,6 +713,8 @@ AC_SUBST(MU_LTLIBOBJS)
AC_SUBST(SIEVE_MODDIR)
SIEVE_MODDIR='$(libdir)/$(PACKAGE)'
MU_FINISH_LINKS
dnl Output Makefiles
AC_CONFIG_FILES([Makefile
auth/Makefile
......@@ -727,12 +733,13 @@ AC_CONFIG_FILES([Makefile
guimb/scm/Makefile
imap4d/Makefile
imap4d/testsuite/Makefile
headers/Makefile
headers/posix/Makefile
include/Makefile
include/mailutils/Makefile
include/mailutils/gnu/Makefile
intl/Makefile
lib/Makefile
lib/posix/Makefile
libmu_scm/Makefile
libsieve/Makefile
m4/Makefile
......
......@@ -67,13 +67,14 @@ AC_DEFUN([jm_INCLUDED_REGEX],
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
(use with caution on other system)],
AC_HELP_STRING([--without-included-regex],
[don't compile regex; this is the default on systems with version 2 of the GNU C library (use with caution on other system)]),
jm_with_regex=$withval,
jm_with_regex=$ac_use_included_regex)
if test "$jm_with_regex" = yes; then
AC_LIBOBJ(regex)
MU_LIBOBJ(regex)
MU_HEADER(regex.h)
MU_HEADER(posix/regex.h)
fi
],
)
......