configure.in 2.34 KB
Newer Older
1
dnl $Id: configure.in,v 1.16 1994/03/06 20:07:46 ceder Exp $
2
dnl Configuration for LysKOM
3
AC_REVISION($Revision: 1.16 $)
Per Cederqvist's avatar
Per Cederqvist committed
4
5
AC_INIT(src/server/lyskomd.h)
AC_PROG_CC
Per Cederqvist's avatar
Per Cederqvist committed
6
AC_SUBST(CFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
7
AC_SUBST(LDFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
8
AC_SUBST(DEPENDFLAG)
9
10
AC_SUBST(INCLUDE_CURRENT)
INCLUDE_CURRENT=-I.
Per Cederqvist's avatar
Per Cederqvist committed
11
12
[if test -n "$GCC"; then
	test -n "$verbose" && echo adding -g -O -ansi -Wall -pipe
Per Cederqvist's avatar
Per Cederqvist committed
13
	CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe"
Per Cederqvist's avatar
Per Cederqvist committed
14
15
16
17
18
19
	DEPENDFLAG=-MM
else
	test -n "$verbose" && echo adding -g
	CFLAGS="$CFLAGS -g"
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
20
			INCLUDE_CURRENT='-I`pwd`';;
Per Cederqvist's avatar
Per Cederqvist committed
21
22
23
24
		*) DEPENDFLAG=-M;;
	esac
fi
test -n "$verbose" && echo Setting DEPENDFLAG to $DEPENDFLAG]
25
26
27
28
29
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
Per Cederqvist's avatar
Per Cederqvist committed
30
AC_CONST
Per Cederqvist's avatar
Per Cederqvist committed
31
AC_STDC_HEADERS
32
33
34
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
[#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
Per Cederqvist's avatar
Per Cederqvist committed
35
36
37
38
39
40
41
42
[test -n "$verbose" && echo '	'No action needed], dnl IF FOUND
[test -n "$verbose" && echo '	'Checking for a fix; dnl IF NOT FOUND
AC_COMPILE_CHECK([_HPUX_SOURCE to fix problems], dnl
[#define _HPUX_SOURCE
#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
AC_DEFINE(_HPUX_SOURCE), dnl
[test -n "$verbose" && echo '	'Problem remains])])dnl
43
AC_SUBST(SRCTOPDIR)
44
[SRCTOPDIR=`cd $srcdir;pwd`]
45
AC_SUBST(BUILDTOPDIR)
46
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
47
48
49
50
51
52
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_AWK
AC_LN_S
AC_PROG_YACC
AC_PROG_LEX
Per Cederqvist's avatar
Per Cederqvist committed
53
54
AC_PROGRAMS_CHECK(SED, sed)
AC_HAVE_HEADERS(string.h memory.h strings.h sys/param.h sys/time.h)
Per Cederqvist's avatar
Per Cederqvist committed
55
AC_HAVE_HEADERS(stdarg.h stdlib.h stddef.h locale.h)
56
AC_TIME_WITH_SYS_TIME
Per Cederqvist's avatar
Per Cederqvist committed
57
AC_ALLOCA
Per Cederqvist's avatar
Per Cederqvist committed
58
59
60
61
62
AC_HAVE_LIBRARY(resolv) dnl Host name lookup.
AC_HAVE_LIBRARY(authuser) dnl User authentication according to RFC 931.
AC_HAVE_LIBRARY(socket) dnl socket() et c on Solaris 2.
AC_HAVE_LIBRARY(nsl) dnl Low-level networking code on Solaris 2.
AC_HAVE_LIBRARY(i) dnl For setlocale() on Ultrix.
63
64
AC_HAVE_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
AC_REPLACE_FUNCS(memcpy difftime strerror remove memset memchr)
65
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
Per Cederqvist's avatar
Per Cederqvist committed
66
67
68
69
70
71
72
73
74
75
76
77
78
79
AC_OUTPUT(Makefile
doc/Makefile
doc/man/Makefile
scripts/Makefile
src/Makefile
src/include/Makefile
src/include/server/Makefile
src/libraries/Makefile
src/libraries/libansi/Makefile
src/libraries/libcommon/Makefile
src/libraries/libisc-new/Makefile
src/libraries/libisc-new/src/Makefile
src/libraries/libmisc/Makefile
src/libraries/regex/Makefile
80
81
src/server/Makefile
run-support/Makefile)