summaryrefslogtreecommitdiff
path: root/configure.in
blob: efe87a287c94268ac44f04984fe7652544decf01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ruby.h)
PROGS="ruby"
AC_SUBST(PROGS)dnl
AC_PROG_CC
AC_GCC_TRADITIONAL
if test "$HOSTTYPE" = sparc; then
  if test "$GCC" = 1 ; then
    STATIC=-static
  else
    STATIC=-Bstatic
  fi
else
  STATIC=
fi
AC_SUBST(STATIC)dnl
AC_PROG_YACC
AC_PROG_INSTALL
AC_HAVE_HEADERS(unistd.h stdlib.h syscall.h a.out.h dirent.h\
		string.h strings.h)
AC_DIR_HEADER
AC_GETGROUPS_T
AC_RETSIGTYPE
AC_HAVE_LIBRARY(m, [LIBS="$LIBS -lm"])
AC_HAVE_LIBRARY(dbm, [LIBS="$LIBS -ldbm"])
AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"])
AC_HAVE_LIBRARY(crypt, [LIBS="$LIBS -lcrypt"])
AC_VFORK
AC_REPLACE_FUNCS(memmove mkdir strerror strftime\
		 strstr strtol strtoul strdup)
AC_HAVE_FUNCS(fmod killpg socket random wait4 waitpid syscall getcwd\
	      setruid seteuid setreuid setrgid setegid setregid\
	      getpriority sigprocmask)
AC_FUNC_CHECK(setenv, [], AC_HAVE_FUNCS(putenv))

case "$LIBOBJS" in
 *) ;;
 *strftime*)
    AC_TIMEZONE
    AC_COMPILE_CHECK([daylight], [],
	 [extern int daylight; int i = daylight;], AC_DEFINE(HAVE_DAYLIGHT));;
esac

AC_ALLOCA
AC_WORDS_BIGENDIAN
AC_ST_BLKSIZE
AC_ST_BLOCKS
AC_ST_RDEV
AC_COMPILE_CHECK([std stdio], [#include <stdio.h>],
[stdin->_cnt > 0;], AC_DEFINE(STDSTDIO))
AC_COMPILE_CHECK([pw_change in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_change;], AC_DEFINE(PW_CHANGE))
AC_COMPILE_CHECK([pw_quota in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_quota;], AC_DEFINE(PW_QUOTA))
AC_COMPILE_CHECK([pw_age in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_age;], AC_DEFINE(PW_AGE))
AC_COMPILE_CHECK([pw_class in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_class;], AC_DEFINE(PW_CLASSS))
AC_COMPILE_CHECK([pw_comment in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_comment;], AC_DEFINE(PW_COMMENT))
AC_COMPILE_CHECK([pw_expire in struct passwd], [#include <pwd.h>],
[struct passwd pw; pw.pw_expire;], AC_DEFINE(PW_EXPIRE))
AC_OUTPUT(Makefile)
mv confdefs.h config.h