| 1 | # Configure template for GNU Diffutils. | 
|---|
| 2 |  | 
|---|
| 3 | # Copyright (C) 1994, 1995, 1998, 2001, 2002 Free Software Foundation, Inc. | 
|---|
| 4 |  | 
|---|
| 5 | # This program is free software; you can redistribute it and/or modify | 
|---|
| 6 | # it under the terms of the GNU General Public License as published by | 
|---|
| 7 | # the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 8 | # any later version. | 
|---|
| 9 |  | 
|---|
| 10 | # This program is distributed in the hope that it will be useful, | 
|---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
| 13 | # GNU General Public License for more details. | 
|---|
| 14 |  | 
|---|
| 15 | # You should have received a copy of the GNU General Public License | 
|---|
| 16 | # along with this program; if not, write to the Free Software | 
|---|
| 17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | 
|---|
| 18 | # 02111-1307, USA. | 
|---|
| 19 |  | 
|---|
| 20 | AC_PREREQ(2.53) | 
|---|
| 21 |  | 
|---|
| 22 | AC_INIT(GNU diffutils, 2.8.1, bug-gnu-utils@gnu.org) | 
|---|
| 23 | AC_CONFIG_SRCDIR(src/diff.c) | 
|---|
| 24 |  | 
|---|
| 25 | AC_CONFIG_AUX_DIR(config) | 
|---|
| 26 | AM_CONFIG_HEADER([config.h:config.hin]) | 
|---|
| 27 | AM_INIT_AUTOMAKE([gnits]) | 
|---|
| 28 |  | 
|---|
| 29 | AC_PROG_AWK | 
|---|
| 30 | AC_PROG_CC | 
|---|
| 31 | AC_ISC_POSIX | 
|---|
| 32 | AM_PROG_CC_STDC | 
|---|
| 33 | AC_PROG_CPP | 
|---|
| 34 | AM_MISSING_PROG(HELP2MAN, help2man) | 
|---|
| 35 | AC_PROG_INSTALL | 
|---|
| 36 | AC_PROG_RANLIB | 
|---|
| 37 |  | 
|---|
| 38 | AC__GNU_SOURCE | 
|---|
| 39 | AC_DEFINE([__EXTENSIONS__], 1, [Enable Solaris extensions.]) | 
|---|
| 40 | AC_SYS_LARGEFILE | 
|---|
| 41 |  | 
|---|
| 42 | AC_C_CONST | 
|---|
| 43 | AC_C_INLINE | 
|---|
| 44 | AC_C_VARARRAYS | 
|---|
| 45 |  | 
|---|
| 46 | AC_DEFINE(DEFAULT_DIFF_PROGRAM, "diff", | 
|---|
| 47 | [Name of "diff" program, unless overridden.]) | 
|---|
| 48 |  | 
|---|
| 49 | AC_DEFINE(DEFAULT_EDITOR_PROGRAM, "ed", | 
|---|
| 50 | [Name of editor program, unless overridden.]) | 
|---|
| 51 |  | 
|---|
| 52 | AC_PATH_PROG(PR_PROGRAM, pr, "") | 
|---|
| 53 | AC_DEFINE_UNQUOTED(PR_PROGRAM, "$PR_PROGRAM", [Name of "pr" program.]) | 
|---|
| 54 |  | 
|---|
| 55 | AC_HEADER_STDBOOL | 
|---|
| 56 | AC_HEADER_STDC | 
|---|
| 57 | AC_CHECK_HEADERS(fcntl.h libintl.h limits.h locale.h \ | 
|---|
| 58 | stdlib.h string.h sys/file.h time.h unistd.h) | 
|---|
| 59 | AC_CHECK_MEMBERS([struct stat.st_blksize]) | 
|---|
| 60 | AC_CHECK_MEMBERS([struct stat.st_rdev]) | 
|---|
| 61 | AC_CHECK_TYPE(ptrdiff_t, int) | 
|---|
| 62 | AC_CHECK_TYPE(ssize_t, int) | 
|---|
| 63 | jm_AC_TYPE_UINTMAX_T | 
|---|
| 64 | AM_GNU_GETTEXT([external]) | 
|---|
| 65 | XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT" | 
|---|
| 66 | AC_HEADER_DIRENT | 
|---|
| 67 | AC_HEADER_STAT | 
|---|
| 68 | AC_HEADER_SYS_WAIT | 
|---|
| 69 | AC_STRUCT_ST_MTIM_NSEC | 
|---|
| 70 | AC_TYPE_PID_T | 
|---|
| 71 | AC_TYPE_SIGNAL | 
|---|
| 72 |  | 
|---|
| 73 | AC_CHECK_FUNCS(diraccess dup2 gettimeofday \ | 
|---|
| 74 | sigaction sigprocmask strchr strerror tmpnam) | 
|---|
| 75 | AC_REPLACE_FUNCS(memchr mkstemp strcasecmp waitpid) | 
|---|
| 76 | if test $ac_cv_func_mkstemp != yes; then | 
|---|
| 77 | AC_LIBOBJ(tempname) | 
|---|
| 78 | fi | 
|---|
| 79 | AC_FUNC_CLOSEDIR_VOID | 
|---|
| 80 | AC_FUNC_FORK | 
|---|
| 81 | AC_FUNC_VPRINTF | 
|---|
| 82 | jm_FUNC_GLIBC_UNLOCKED_IO | 
|---|
| 83 | jm_FUNC_GNU_STRFTIME | 
|---|
| 84 | # No need for AC_FUNC_MEMCMP, since memcmp is used only to test for equality. | 
|---|
| 85 | jm_FUNC_MALLOC | 
|---|
| 86 | jm_FUNC_REALLOC | 
|---|
| 87 | jm_PREREQ_C_STACK | 
|---|
| 88 | jm_PREREQ_ERROR | 
|---|
| 89 | jm_PREREQ_HARD_LOCALE | 
|---|
| 90 | jm_PREREQ_QUOTEARG | 
|---|
| 91 | jm_PREREQ_REGEX | 
|---|
| 92 | AC_DEFINE([REGEX_MALLOC], 1, | 
|---|
| 93 | [Define to 1 to avoid alloca in the regular-expression implementation.]) | 
|---|
| 94 | jm_PREREQ_TEMPNAME | 
|---|
| 95 | jm_AC_PREREQ_XSTRTOUMAX | 
|---|
| 96 |  | 
|---|
| 97 | # Check for clock_gettime and its library.  Solaris puts it in -lrt or | 
|---|
| 98 | # -lposix4, but we don't want to link that library unless we have to. | 
|---|
| 99 | diff_saved_libs=$LIBS | 
|---|
| 100 | AC_SEARCH_LIBS(clock_gettime, [rt posix4]) | 
|---|
| 101 | case $ac_cv_search_clock_gettime in | 
|---|
| 102 | no | 'none required') | 
|---|
| 103 | LIB_CLOCK_GETTIME=;; | 
|---|
| 104 | *) | 
|---|
| 105 | LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime;; | 
|---|
| 106 | esac | 
|---|
| 107 | AC_SUBST([LIB_CLOCK_GETTIME]) | 
|---|
| 108 | AC_CHECK_FUNCS(clock_gettime) | 
|---|
| 109 | LIBS=$diff_saved_libs | 
|---|
| 110 |  | 
|---|
| 111 | # fnmatch | 
|---|
| 112 | AC_FUNC_FNMATCH | 
|---|
| 113 | if test $ac_cv_func_fnmatch_works = yes; then | 
|---|
| 114 | rm -f lib/fnmatch.h | 
|---|
| 115 | else | 
|---|
| 116 | AC_LIBOBJ(fnmatch) | 
|---|
| 117 | AC_CONFIG_LINKS(lib/fnmatch.h:lib/fnmatch.hin) | 
|---|
| 118 | fi | 
|---|
| 119 |  | 
|---|
| 120 | # regex | 
|---|
| 121 | jm_INCLUDED_REGEX([lib/regex.c]) | 
|---|
| 122 | if test "$jm_with_regex" = yes; then | 
|---|
| 123 | AC_CONFIG_LINKS(lib/regex.h:lib/regex.hin) | 
|---|
| 124 | else | 
|---|
| 125 | rm -f lib/regex.h | 
|---|
| 126 | fi | 
|---|
| 127 |  | 
|---|
| 128 | jm_AC_DOS | 
|---|
| 129 | AC_FUNC_SETMODE_DOS | 
|---|
| 130 |  | 
|---|
| 131 | AC_CONFIG_FILES([Makefile doc/Makefile \ | 
|---|
| 132 | lib/Makefile lib/posix/Makefile man/Makefile \ | 
|---|
| 133 | m4/Makefile ms/Makefile po/Makefile.in src/Makefile]) | 
|---|
| 134 | AC_CONFIG_COMMANDS([default], [date > stamp-h]) | 
|---|
| 135 | AC_OUTPUT | 
|---|