]> git.cworth.org Git - gzip/blob - configure.in
Imported Upstream version 1.3.2
[gzip] / configure.in
1 # Configure template for gzip.
2
3 # Copyright (C) 1999, 2000, 2001 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_INIT(gzip.c)
22 AM_INIT_AUTOMAKE(gzip, 1.3.2)
23 AM_CONFIG_HEADER(config.h)
24 AC_PREREQ(2.52)
25 AC_PROG_CC
26 AC_PROG_LN_S
27 AC_PROG_SHELL
28 AC_OBJEXT
29 AC_AIX
30 AC_MINIX
31 AC_SYS_LARGEFILE
32
33 dnl
34 dnl Try to assemble match.S with and without leading underline.
35 dnl cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
36 dnl Also, "gcc -E match.s" ignores -E, so we must use match.S.
37 echo checking for underline in external names
38 test -z "$ASCPP" -a -f /lib/cpp && ASCPP=/lib/cpp
39 test -z "$ASCPP" && ASCPP="$CC -E"
40 cat > conftest.c <<EOF
41 int foo() {return 0;}
42 EOF
43 eval "$CC -c conftest.c > /dev/null 2>&1"
44 if nm conftest.$OBJEXT | grep _foo > /dev/null 2>&1 ; then
45   :
46 else
47   ASCPP="${ASCPP} -DNO_UNDERLINE"
48 fi
49 rm -f _match.$OBJEXT conftest.c conftest.$OBJEXT
50 if echo "$DEFS" | grep NO_ASM >/dev/null; then
51   :
52 else
53   echo checking for assembler
54   if eval "$ASCPP $srcdir/match.S > _match.s 2>/dev/null"; then
55     if test ! -s _match.s || grep error < _match.s > /dev/null; then
56       :
57     elif eval "$CC -c _match.s >/dev/null 2>&1" && test -f _match.$OBJEXT; then
58       AC_DEFINE(ASMV, ,
59         [Define if an assembler version of longest_match is available.])
60       LIBOBJS="$LIBOBJS match.$OBJEXT"
61       # Work around automake 1.4 bug
62       : LIBOBJS="$LIBOBJS match.o"
63     fi
64   fi
65   rm -f _match.s _match.$OBJEXT
66 fi
67 dnl
68 AC_EXEEXT
69 AC_ISC_POSIX
70 AC_C_CONST
71 AC_STDC_HEADERS
72 AC_CHECK_HEADERS(fcntl.h limits.h memory.h \
73   stdlib.h string.h sys/utime.h time.h unistd.h utime.h)
74 AC_CHECK_FUNCS(lstat utime)
75 AC_REPLACE_FUNCS(rpmatch)
76 AC_HEADER_DIRENT
77 AC_TYPE_SIGNAL
78 AC_TYPE_SIZE_T
79 AC_TYPE_OFF_T
80 AC_SYS_INTERPRETER
81 case $interpval in
82 yes) SEDCMD='1d';;
83 *) SEDCMD='';;
84 esac
85
86 AC_PREFIX_PROGRAM(gzip)
87 AC_SUBST(LIBOBJS)dnl
88 AC_SUBST(CFLAGS)dnl
89 AC_SUBST(ASCPP)dnl
90 AC_SUBST(SEDCMD)dnl
91 AC_OUTPUT(Makefile)