home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / GNUZIP.ZIP / CONFIGUR.IN < prev    next >
Text File  |  1993-03-28  |  2KB  |  90 lines

  1. dnl Process this file with autoconf to produce a configure script for gzip
  2. dnl
  3. dnl Written by friedman@prep.ai.mit.edu 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 End of local macros
  42. dnl
  43. AC_INIT(gzip.c)
  44. AC_PROG_CC
  45. dnl AC_PROG_CPP
  46. dnl
  47. dnl Try to assemble match.S with and without leading underline.
  48. dnl cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
  49. dnl Also, "gcc -E match.s" ignores -E, so we must use match.S.
  50. echo checking for underline in external names
  51. test -z "$CPP" -a -f /lib/cpp && CPP=/lib/cpp
  52. test -z "$CPP" && CPP="$CC -E"
  53. cat > conftest.c <<EOF
  54. int foo() {return 0;}
  55. EOF
  56. $CC -c conftest.c > /dev/null 2>&1
  57. if nm conftest.o | grep _foo > /dev/null 2>&1 ; then
  58.   :
  59. else
  60.   CPP="${CPP} -DNO_UNDERLINE"
  61. fi
  62. echo checking for 386 assembler
  63. rm -f _match.o conftest.[co]
  64. $CPP $srcdir/match.S > _match.s
  65. if grep error < _match.s > /dev/null; then
  66.   OBJA=""
  67. elif $CC -c _match.s >/dev/null 2>&1 && test -f _match.o; then
  68.   DEFS="${DEFS} -DASMV"
  69.   OBJA=match.o
  70. fi
  71. rm -f _match.s _match.o
  72. dnl
  73. AC_PROG_INSTALL
  74. AC_AIX
  75. AC_MINIX
  76. AC_ISC_POSIX
  77. AC_DYNIX_SEQ
  78. AC_STDC_HEADERS
  79. dnl if STDC_HEADERS can't be defined, look for special files:
  80. AC_HAVE_HEADERS(unistd.h stdlib.h fcntl.h string.h memory.h utime.h sys/utime.h)
  81. AC_DIR_HEADER
  82. AC_XENIX_DIR
  83. AC_ALLOCA
  84. AC_RETSIGTYPE
  85. ACL_HAVE_SHELL_HACK([SEDCMD="1d"], [SEDCMD=""])
  86. AC_PREFIX(gzip)
  87. AC_SUBST(OBJA)dnl
  88. AC_SUBST(SEDCMD)dnl
  89. AC_OUTPUT(Makefile)
  90.