]> git.cworth.org Git - gzip/blob - configure.in
Imported Debian patch 1.3.5-15
[gzip] / configure.in
1 # Configure template for gzip.
2
3 # Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 # Copyright (C) 1992-1993 Jean-loup Gailly
5
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
9 # any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 # 02111-1307, USA.
20
21 AC_PREREQ(2.54)
22 AC_INIT(gzip, 1.3.5, bug-gzip@gnu.org)
23 AC_CONFIG_SRCDIR(gzip.c)
24 AM_INIT_AUTOMAKE
25
26 AM_CONFIG_HEADER(config.h)
27 AC_PROG_CC
28 AC_PROG_CPP
29 AC_PROG_LN_S
30 AC_PROG_SHELL
31 AC_AIX
32 AC_GNU_SOURCE
33 AC_MINIX
34 AC_SYS_LARGEFILE
35
36 # cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
37 test -z "$ASCPP" && test -f /lib/cpp && ASCPP=/lib/cpp
38 test -z "$ASCPP" && ASCPP="$CPP"
39
40 AC_CACHE_CHECK([for underline in external names], [gzip_cv_underline],
41   [gzip_cv_underline=yes
42    AC_TRY_COMPILE([int foo() {return 0;}], [],
43      [nm conftest.$OBJEXT | grep _foo >/dev/null 2>&1 ||
44         gzip_cv_underline=no])])
45 if test $gzip_cv_underline = no; then
46   ASCPP="${ASCPP} -DNO_UNDERLINE"
47 fi
48 AC_OBJEXT
49
50 # Try to assemble match.S.
51 # "gcc -E match.s" ignores -E, so we must use match.S.
52 AC_CACHE_CHECK([for assembler], [gzip_cv_assembler],
53   [gzip_cv_assembler=no
54    case " $DEFS " in
55    *' NO_ASM '*) ;;
56    *)
57      if cp $srcdir/match.c _match.S &&
58         eval "$ASCPP _match.S > _match.s 2>/dev/null"; then
59        if test ! -s _match.s || grep error < _match.s > /dev/null; then
60          :
61        elif eval "$CC -c _match.s >/dev/null 2>&1" &&
62             test -f _match.$OBJEXT; then
63          gzip_cv_assembler=yes
64        fi
65      fi
66      rm -f _match.S _match.s _match.$OBJEXT;;
67    esac])
68 if test $gzip_cv_assembler = yes; then
69   AC_DEFINE(ASMV, ,
70     [Define if an assembler version of longest_match is available.])
71   AC_LIBOBJ(match)
72 fi
73
74 AC_ISC_POSIX
75 AC_C_CONST
76 AC_HEADER_STDC
77 AC_CHECK_HEADERS(fcntl.h limits.h memory.h \
78   sys/utime.h time.h utime.h)
79 AC_CHECK_FUNCS(lstat utime)
80 AC_REPLACE_FUNCS(rpmatch)
81 AC_HEADER_DIRENT
82 AC_TYPE_SIGNAL
83 AC_TYPE_SIZE_T
84 AC_TYPE_OFF_T
85 AC_SYS_INTERPRETER
86 case $interpval in
87 yes) SEDCMD='1d';;
88 *) SEDCMD='';;
89 esac
90
91 AC_PREFIX_PROGRAM(gzip)
92 AC_SUBST(ASCPP)dnl
93 AC_SUBST(SEDCMD)dnl
94 AC_CONFIG_FILES([Makefile])
95 AC_OUTPUT