home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Current Shareware 1994 January
/
SHAR194.ISO
/
compress
/
gnuzip_.zip
/
CONFIGUR.IN
< prev
next >
Wrap
Text File
|
1993-03-28
|
2KB
|
90 lines
dnl Process this file with autoconf to produce a configure script for gzip
dnl
dnl Written by friedman@prep.ai.mit.edu 28-Dec-92
dnl Last modified 26-Jan-93
dnl "Usage: ACL_HAVE_SHELL_HACK(ACTION_IF_EXISTS [, ACTION_IF_NOT_EXISTS])"
dnl
define(ACL_HAVE_SHELL_HACK, [dnl
echo "checking for #! kernel hack"
cat <<'__EOF__' > conftest.csh
#!/bin/csh -f
setenv SHELL /bin/csh
# Avoid tcsh bug 'Bad Hertz Value':
setenv HZ 60
# Make sure foo doesn't get exported into the environment
# Astoundingly, some versions of csh don't have unsetenv.
unsetenv foo >& /dev/null
unset foo
set output="`./conftest.sh`"
if ( "$[]output" == "foo=bar" ) then
exit 0
endif
exit 1
__EOF__
cat <<'__EOF__' > conftest.sh
#!/bin/sh
# If this is really run with sh, then 1st positional arg will be "foo=bar".
# If this script was executed by csh, then a shell variable "foo" will have
# the value "var".
set foo=bar
echo "$[]*"
__EOF__
chmod 777 conftest.csh conftest.sh
(csh -f ./conftest.csh) 2> /dev/null
if test $? = 0 ; then
:; $1
else
:; $2
fi
rm -f conftest.csh conftest.sh
])dnl
dnl End of local macros
dnl
AC_INIT(gzip.c)
AC_PROG_CC
dnl AC_PROG_CPP
dnl
dnl Try to assemble match.S with and without leading underline.
dnl cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
dnl Also, "gcc -E match.s" ignores -E, so we must use match.S.
echo checking for underline in external names
test -z "$CPP" -a -f /lib/cpp && CPP=/lib/cpp
test -z "$CPP" && CPP="$CC -E"
cat > conftest.c <<EOF
int foo() {return 0;}
EOF
$CC -c conftest.c > /dev/null 2>&1
if nm conftest.o | grep _foo > /dev/null 2>&1 ; then
:
else
CPP="${CPP} -DNO_UNDERLINE"
fi
echo checking for 386 assembler
rm -f _match.o conftest.[co]
$CPP $srcdir/match.S > _match.s
if grep error < _match.s > /dev/null; then
OBJA=""
elif $CC -c _match.s >/dev/null 2>&1 && test -f _match.o; then
DEFS="${DEFS} -DASMV"
OBJA=match.o
fi
rm -f _match.s _match.o
dnl
AC_PROG_INSTALL
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_DYNIX_SEQ
AC_STDC_HEADERS
dnl if STDC_HEADERS can't be defined, look for special files:
AC_HAVE_HEADERS(unistd.h stdlib.h fcntl.h string.h memory.h utime.h sys/utime.h)
AC_DIR_HEADER
AC_XENIX_DIR
AC_ALLOCA
AC_RETSIGTYPE
ACL_HAVE_SHELL_HACK([SEDCMD="1d"], [SEDCMD=""])
AC_PREFIX(gzip)
AC_SUBST(OBJA)dnl
AC_SUBST(SEDCMD)dnl
AC_OUTPUT(Makefile)