|
|
1.1 root 1: dnl Process this file with autoconf to produce a configure script for gzip
2: dnl
3: dnl Written by [email protected] 28-Dec-92
4: dnl Last modified 26-Jan-93
5: dnl "Usage: ACL_HAVE_SHELL_HACK(ACTION_IF_EXISTS [, ACTION_IF_NOT_EXISTS])"
6: dnl
7: define(ACL_HAVE_SHELL_HACK, [dnl
8: echo "checking for #! kernel hack"
9: cat <<'__EOF__' > conftest.csh
10: #!/bin/csh -f
11: setenv SHELL /bin/csh
12: # Avoid tcsh bug 'Bad Hertz Value':
13: setenv HZ 60
14: # Make sure foo doesn't get exported into the environment
15: # Astoundingly, some versions of csh don't have unsetenv.
16: unsetenv foo >& /dev/null
17: unset foo
18: set output="`./conftest.sh`"
19: if ( "$[]output" == "foo=bar" ) then
20: exit 0
21: endif
22: exit 1
23: __EOF__
24: cat <<'__EOF__' > conftest.sh
25: #!/bin/sh
26: # If this is really run with sh, then 1st positional arg will be "foo=bar".
27: # If this script was executed by csh, then a shell variable "foo" will have
28: # the value "var".
29: set foo=bar
30: echo "$[]*"
31: __EOF__
32: chmod 777 conftest.csh conftest.sh
33: (csh -f ./conftest.csh) 2> /dev/null
34: if test $? = 0 ; then
35: :; $1
36: else
37: :; $2
38: fi
39: rm -f conftest.csh conftest.sh
40: ])dnl
41: dnl
42: dnl Same as AC_RETSIGTYPE, but use a void default.
43: dnl
44: define(AC_RETSIGTYP,
45: [AC_COMPILE_CHECK([return type of signal handlers],
46: [#include <sys/types.h>
47: #include <signal.h>
48: #ifdef signal
49: #undef signal
50: #endif
51: extern int (*signal ()) ();],
52: [int i;],
53: [AC_DEFINE(RETSIGTYPE, int)],
54: [],
55: )]
56: )dnl
57: dnl
58: dnl
59: dnl End of local macros
60: dnl
61: AC_INIT(gzip.c)
62: AC_PROG_CC
63: dnl AC_PROG_CPP
64: dnl
65: dnl Try to assemble match.S with and without leading underline.
66: dnl cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
67: dnl Also, "gcc -E match.s" ignores -E, so we must use match.S.
68: echo checking for underline in external names
69: test -z "$CPP" -a -f /lib/cpp && CPP=/lib/cpp
70: test -z "$CPP" && CPP="$CC -E"
71: cat > conftest.c <<EOF
72: int foo() {return 0;}
73: EOF
74: $CC -c conftest.c > /dev/null 2>&1
75: if nm conftest.o | grep _foo > /dev/null 2>&1 ; then
76: :
77: else
78: CPP="${CPP} -DNO_UNDERLINE"
79: fi
80: echo checking for assembler
81: rm -f _match.o conftest.[co]
82: $CPP $srcdir/match.S > _match.s
83: if grep error < _match.s > /dev/null; then
84: OBJA=""
85: elif $CC -c _match.s >/dev/null 2>&1 && test -f _match.o; then
86: DEFS="${DEFS} -DASMV"
87: OBJA=match.o
88: fi
89: rm -f _match.s _match.o
90: dnl
91: AC_PROG_INSTALL
92: AC_AIX
93: AC_MINIX
94: AC_ISC_POSIX
95: AC_DYNIX_SEQ
96: AC_STDC_HEADERS
97: dnl if STDC_HEADERS can't be defined, look for special files:
98: AC_HEADER_CHECK(string.h, ,AC_DEFINE(NO_STRING_H))
99: AC_HEADER_CHECK(stdlib.h, ,AC_DEFINE(NO_STDLIB_H))
100: AC_HEADER_CHECK(memory.h, ,AC_DEFINE(NO_MEMORY_H))
101: AC_HEADER_CHECK(fcntl.h, ,AC_DEFINE(NO_FCNTL_H))
102: AC_HAVE_HEADERS(unistd.h)
103: utime=0
104: AC_HEADER_CHECK(utime.h, utime=1 ,AC_DEFINE(NO_UTIME_H))
105: if test $utime -eq 0; then
106: AC_HAVE_HEADERS(sys/utime.h)
107: fi
108: AC_DIR_HEADER
109: dnl Work around incorrect dirent.h in NeXT 2.0:
110: if test -f /usr/bin/hostinfo && /usr/bin/hostinfo | grep NeXT > /dev/null; then
111: if /usr/bin/hostinfo | grep -s "Mach [12]"; then
112: DEFS="`echo $DEFS | sed 's/-DDIRENT=1/-DSYSDIR=1/'`"
113: fi
114: fi
115: AC_XENIX_DIR
116: AC_ALLOCA
117: AC_RETSIGTYP
118: ACL_HAVE_SHELL_HACK([SEDCMD="1d"], [SEDCMD=""])
119: AC_PREFIX(gzip)
120: AC_SUBST(OBJA)dnl
121: AC_SUBST(SEDCMD)dnl
122: AC_OUTPUT(Makefile)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.