mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-28 18:34:36 +00:00
(AC_INIT): Use src/diff.c, not diff.h, as the source files got removed.
(AM_CONFIG_HEADER): Switch from AC_CONFIG_HEADER. (AC_ARG_PROGRAM, AC_MINIX): Remove. (AC_PREREQ, AM_INIT_AUTOMAKE, ALL_LINGUAS, AC_PROG_AWK, AM_PROG_CC_STDC, AC_PROG_RANLIB, AC_C_INLINE, AC_C_VARARRAYS, DEFAULT_DIFF_PROGRAM, DEFAULT_EDITOR_PROGRAM, AC_STRUCT_ST_MTIM_NSEC): Add. (PR_PROGRAM): AC_DEFINE. (AC_SYS_LARGEFILE): Use instead of our homebrew version. (_GNU_SOURCE): Define if not defined. (AC_CHECK_HEADERS): Add stdbool.h, unistd.h. (AC_CHECK_TYPES): Add ptrdiff_t, uintmax_t. (AM_GNU_GETTEXT, XGETTEXT): Add. (WITH_MVFS_STAT_BUG, WITH_NFS_STAT_BUG): Remove. (HAVE_MEMCHR): Remove. (AC_CHECK_FUNCS): Add diraccess. (AC_REPLACE_FUNCS): Add memchr, waitpid. (jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_GNU_STRFTIME, jm_FUNC_MALLOC, jm_FUNC_REALLOC, jm_PREREQ_ERROR, jm_PREREQ_QUOTEARG, jm_PREREQ_REGEX, jm_PREREQ_TEMPNAME, jm_AC_PREREQ_XSTRTOUMAX, AC_FUNC_FNMATCH): Add. (fnmatch.h, regex.h): Do not create these files unless we're using our own fnmatch and regex. (AC_OUTPUT): Add doc/Makefile, intl/Makefile, lib/Makefile, lib/posix/Makefile, m4/Makefile, po/Makefile.in, src/Makefile.
This commit is contained in:
parent
851e787576
commit
abb43c1f76
156
configure.ac
156
configure.ac
@ -1,109 +1,97 @@
|
||||
# Configure template for GNU diffutils.
|
||||
# Copyright 1994, 1995, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995, 1998, 2001 Free Software Foundation, Inc.
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(diff.h)
|
||||
AC_CONFIG_HEADER(config.h:config.hin)
|
||||
AC_ARG_PROGRAM
|
||||
AC_INIT(src/diff.c)
|
||||
AM_CONFIG_HEADER([config.h:config.hin])
|
||||
AC_PREREQ(2.52)
|
||||
AM_INIT_AUTOMAKE(diffutils, 2.7.3)
|
||||
ALL_LINGUAS="da de en_GB eo es fr gl id pl ru sv tr"
|
||||
|
||||
AC_PROG_AWK
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AM_PROG_CC_STDC
|
||||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AH_VERBATIM([_GNU_SOURCE],
|
||||
[/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
#endif])
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_C_VARARRAYS
|
||||
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_DIFF_PROGRAM, "$bindir/diff",
|
||||
[Name of "diff" program, unless overridden.])
|
||||
|
||||
AC_DEFINE(DEFAULT_EDITOR_PROGRAM, "ed",
|
||||
[Name of editor program, unless overridden.])
|
||||
|
||||
AC_PATH_PROG(PR_PROGRAM, pr, "")
|
||||
|
||||
# If available, prefer support for large files unless the user specified
|
||||
# one of the CPPFLAGS, LDFLAGS, or LIBS variables.
|
||||
AC_MSG_CHECKING(whether large file support needs explicit enabling)
|
||||
ac_getconfs=''
|
||||
ac_result=yes
|
||||
ac_set=''
|
||||
ac_shellvars='CPPFLAGS LDFLAGS LIBS'
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
case $ac_shellvar in
|
||||
CPPFLAGS) ac_lfsvar=LFS_CFLAGS ;;
|
||||
*) ac_lfsvar=LFS_$ac_shellvar ;;
|
||||
esac
|
||||
eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar
|
||||
(getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; }
|
||||
ac_getconf=`getconf $ac_lfsvar`
|
||||
ac_getconfs=$ac_getconfs$ac_getconf
|
||||
eval ac_test_$ac_shellvar=\$ac_getconf
|
||||
done
|
||||
case "$ac_result$ac_getconfs" in
|
||||
yes) ac_result=no ;;
|
||||
esac
|
||||
case "$ac_result$ac_set" in
|
||||
yes?*) ac_result="yes, but $ac_set is already set, so use its settings"
|
||||
esac
|
||||
AC_MSG_RESULT($ac_result)
|
||||
case $ac_result in
|
||||
yes)
|
||||
for ac_shellvar in $ac_shellvars; do
|
||||
eval $ac_shellvar=\$ac_test_$ac_shellvar
|
||||
done ;;
|
||||
esac
|
||||
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
AC_C_CONST
|
||||
AC_DEFINE(PR_PROGRAM, "$PR_PROGRAM", [Name of "pr" program.])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(unistd.h fcntl.h libintl.h limits.h locale.h stdlib.h string.h sys/file.h time.h)
|
||||
AC_CHECK_LIB(intl, gettext)
|
||||
AC_CHECK_HEADERS(fcntl.h libintl.h limits.h locale.h \
|
||||
stdbool.h stdlib.h string.h sys/file.h time.h unistd.h)
|
||||
AC_CHECK_TYPES([ptrdiff_t, uintmax_t])
|
||||
AM_GNU_GETTEXT
|
||||
XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STAT
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_STRUCT_ST_BLKSIZE
|
||||
AC_STRUCT_ST_MTIM_NSEC
|
||||
AC_STRUCT_ST_RDEV
|
||||
AC_TYPE_PID_T
|
||||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_MSG_CHECKING([for st_fstype string in struct stat])
|
||||
AC_CACHE_VAL(diff_cv_st_fstype_string,
|
||||
[AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/stat.h>], [struct stat s; s.st_fstype[0] = 'x';],
|
||||
diff_cv_st_fstype_string=yes,
|
||||
diff_cv_st_fstype_string=no)])
|
||||
AC_MSG_RESULT($diff_cv_st_fstype_string)
|
||||
if test $diff_cv_st_fstype_string = yes; then
|
||||
AC_DEFINE(HAVE_ST_FSTYPE_STRING)
|
||||
AC_CHECK_FUNCS(diraccess dup2 \
|
||||
sigaction sigprocmask strchr strerror tmpnam)
|
||||
AC_REPLACE_FUNCS(memchr mkstemp strcasecmp waitpid)
|
||||
if test $ac_cv_func_mkstemp != yes; then
|
||||
LIBOBJS="$LIBOBJS tempname.$ac_objext"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(mvfs-stat-bug,
|
||||
[ --with-mvfs-stat-bug work around ClearCase MVFS stat bug (bug id ATRia04618)])
|
||||
case $with_mvfs_stat_bug in
|
||||
yes)
|
||||
AC_DEFINE(WITH_MVFS_STAT_BUG)
|
||||
esac
|
||||
|
||||
AC_ARG_WITH(nfs-stat-bug,
|
||||
[ --with-nfs-stat-bug work around rare NFS server bugs (see README)])
|
||||
case $with_nfs_stat_bug in
|
||||
yes)
|
||||
AC_DEFINE(WITH_NFS_STAT_BUG)
|
||||
esac
|
||||
|
||||
# Check for NetBSD 1.0 bug, where memchr(..., 0) returns nonzero.
|
||||
AC_MSG_CHECKING(for working memchr)
|
||||
AC_CACHE_VAL(ac_cv_func_memchr,
|
||||
[AC_TRY_RUN([#include <string.h>
|
||||
main () { exit (memchr ("", 0, 0) != 0 || memchr ("", 1, 0) != 0); }],
|
||||
ac_cv_func_memchr=yes,
|
||||
ac_cv_func_memchr=no,
|
||||
AC_MSG_WARN([We are cross-compiling so we assume memchr does not work.])
|
||||
ac_cv_func_memchr=no)])dnl
|
||||
AC_MSG_RESULT($ac_cv_func_memchr)
|
||||
if test $ac_cv_func_memchr = yes; then
|
||||
AC_DEFINE(HAVE_MEMCHR)
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS(dup2 sigaction sigprocmask strchr strerror tmpnam)
|
||||
AC_REPLACE_FUNCS(memchr waitpid)
|
||||
AC_FUNC_ALLOCA
|
||||
AC_FUNC_CLOSEDIR_VOID
|
||||
dnl No need for AC_FUNC_MEMCMP, since memcmp is used only to test for equality.
|
||||
jm_FUNC_GLIBC_UNLOCKED_IO
|
||||
jm_FUNC_GNU_STRFTIME
|
||||
# No need for AC_FUNC_MEMCMP, since memcmp is used only to test for equality.
|
||||
AC_FUNC_VFORK
|
||||
AC_FUNC_VPRINTF
|
||||
jm_FUNC_MALLOC
|
||||
jm_FUNC_REALLOC
|
||||
jm_PREREQ_ERROR
|
||||
jm_PREREQ_QUOTEARG
|
||||
jm_PREREQ_REGEX
|
||||
jm_PREREQ_TEMPNAME
|
||||
# We don't actually use xstrtoumax, but we use nearly all the things
|
||||
# it uses.
|
||||
jm_AC_PREREQ_XSTRTOUMAX
|
||||
|
||||
AC_OUTPUT(Makefile, [date > stamp-h])
|
||||
# fnmatch
|
||||
AC_FUNC_FNMATCH
|
||||
if test $ac_cv_func_fnmatch_works = yes; then
|
||||
rm -f lib/fnmatch.h
|
||||
else
|
||||
AC_LIBOBJ(fnmatch)
|
||||
AC_CONFIG_LINKS(lib/fnmatch.h:lib/fnmatch.hin)
|
||||
fi
|
||||
|
||||
# regex
|
||||
jm_INCLUDED_REGEX([lib/regex.c])
|
||||
if test "$jm_with_regex" = yes; then
|
||||
AC_CONFIG_LINKS(lib/regex.h:lib/regex.hin)
|
||||
else
|
||||
rm -f lib/regex.h
|
||||
fi
|
||||
|
||||
AC_OUTPUT([Makefile doc/Makefile intl/Makefile \
|
||||
lib/Makefile lib/posix/Makefile \
|
||||
m4/Makefile po/Makefile.in src/Makefile],
|
||||
[date > stamp-h])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user