home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 036 / less232.zip / CONFIGUR.IN < prev    next >
Text File  |  1994-09-23  |  3KB  |  100 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(forwback.c)
  3. AC_CONFIG_HEADER(defines.h)
  4.  
  5. dnl Checks for programs.
  6. AC_PROG_CC
  7. AC_GCC_TRADITIONAL
  8. AC_PROG_INSTALL
  9.  
  10. dnl Checks for libraries.
  11. dnl Prefer BSD termcap library to SysV curses library.
  12. AC_HAVE_LIBRARY(curses, [LIBS="$LIBS -lcurses"])
  13. AC_HAVE_LIBRARY(termcap, [LIBS="$LIBS -ltermcap"])
  14. dnl ??? AC_HAVE_LIBRARY(termlib, [LIBS="$LIBS -ltermlib"])
  15. dnl Regular expressions (regcmp) are in -lgen or -lucb on Solaris 2.
  16. AC_HAVE_LIBRARY(gen, [LIBS="$LIBS -lgen"])
  17. AC_HAVE_LIBRARY(ucb, [LIBS="$LIBS -lucb"])
  18. AC_HAVE_LIBRARY(intl, [LIBS="$LIBS -lintl"])
  19. dnl ??? AC_HAVE_LIBRARY(gnuregex, [LIBS="$LIBS -lgnuregex"])
  20.  
  21. dnl Checks for header files.
  22. AC_STDC_HEADERS
  23. AC_HAVE_HEADERS(errno.h fcntl.h stdio.h termcap.h termio.h termios.h time.h unistd.h values.h sys/ioctl.h sys/stream.h sys/ptem.h)
  24.  
  25. dnl Checks for identifiers.
  26. AC_OFF_T
  27. AC_COMPILE_CHECK(void, , [void *foo = 0;], 
  28.   [AC_DEFINE(HAVE_VOID)])
  29. AC_COMPILE_CHECK(time_t, [#include <time.h>], [time_t t = 0;],
  30.   [AC_DEFINE(HAVE_TIME_T)])
  31.  
  32. dnl Checks for functions and external variables.
  33. AC_RETSIGTYPE
  34. AC_HAVE_FUNCS(_setjmp system sigsetmask memcpy)
  35. dnl Some systems have termios.h but not the corresponding functions.
  36. AC_FUNC_CHECK(tcgetattr, AC_DEFINE(HAVE_TERMIOS_FUNCS))
  37. AC_COMPILE_CHECK(strerror, [
  38. #if HAVE_STDIO_H
  39. #include <stdio.h>
  40. #endif
  41. #if HAVE_STRING_H
  42. #include <string.h>
  43. #endif
  44. #if HAVE_ERRNO_H
  45. #include <errno.h>
  46. #endif], [static char *x; x = strerror(0);],
  47.   [AC_DEFINE(HAVE_STRERROR)])
  48. AC_COMPILE_CHECK(, , [extern int sys_errlist; static int x; x = sys_errlist;], 
  49.   [AC_DEFINE(HAVE_SYS_ERRLIST)])
  50. AC_COMPILE_CHECK(, , [extern int errno; static int x; x = errno;], 
  51.   [AC_DEFINE(HAVE_ERRNO)])
  52. AC_COMPILE_CHECK(locale, [#include <locale.h>
  53. #include <ctype.h>], [setlocale(LC_CTYPE,""); isprint(0); iscntrl(0);],
  54.   [AC_DEFINE(HAVE_LOCALE)])
  55.  
  56. have_ospeed=no
  57. AC_CHECKING(termcap for ospeed)
  58. AC_COMPILE_CHECK(, [
  59. #include <sys/types.h>
  60. #if HAVE_TERMIOS_H
  61. #include <termios.h>
  62. #endif
  63. #if HAVE_TERMCAP_H
  64. #include <termcap.h>
  65. #endif], [ospeed = 0;], [AC_DEFINE(HAVE_OSPEED) have_ospeed=yes])
  66. if test $have_ospeed = no; then
  67. AC_COMPILE_CHECK(, , [extern short ospeed; ospeed = 0;], 
  68.   [AC_DEFINE(HAVE_OSPEED) AC_DEFINE(MUST_DEFINE_OSPEED)])
  69. fi
  70.  
  71.  
  72. dnl Checks for regular expression functions.
  73. have_regex=no
  74. AC_CHECKING(for POSIX regex.h)
  75. AC_COMPILE_CHECK(, [#include <sys/types.h>
  76. #include <regex.h>],
  77.   [regex_t *r; regfree(r);],
  78.   AC_DEFINE(HAVE_POSIX_REGCOMP) have_regex=yes)
  79. if test $have_regex = no; then
  80. AC_FUNC_CHECK(regcmp, AC_DEFINE(HAVE_REGCMP) have_regex=yes)
  81. fi
  82. if test $have_regex = no; then
  83. AC_COMPILE_CHECK(, [#include "regexp.h"], [regcomp("");],
  84. AC_DEFINE(HAVE_V8_REGCOMP) have_regex=yes)
  85. fi
  86. if test $have_regex = no && test -f ${srcdir}/regex.c; then
  87. AC_DEFINE(HAVE_POSIX_REGCOMP) REGEX_O='regex.$(O)' AC_SUBST(REGEX_O) have_regex=yes
  88. fi
  89. if test $have_regex = no && test -f ${srcdir}/regexp.c; then
  90. AC_DEFINE(HAVE_V8_REGCOMP) REGEX_O='regexp.$(O)' AC_SUBST(REGEX_O) have_regex=yes
  91. fi
  92. if test $have_regex = no; then
  93. AC_FUNC_CHECK(re_comp, AC_DEFINE(HAVE_RE_COMP) have_regex=yes)
  94. fi
  95. if test $have_regex = no; then
  96. AC_DEFINE(NO_REGEX)
  97. fi
  98.  
  99. AC_OUTPUT(Makefile)
  100.