configure.in 3.12 KB
Newer Older
1
dnl $Id: configure.in,v 1.20 1994/08/29 17:34:51 ceder Exp $
2
dnl Configuration for LysKOM
Per Cederqvist's avatar
Per Cederqvist committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dnl Copyright (C) 1993, 1994  Lysator Academic Computer Association.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl Please mail bug reports to bug-lyskom@lysator.liu.se. 
dnl
21
AC_REVISION($Revision: 1.20 $)
Per Cederqvist's avatar
Per Cederqvist committed
22
23
AC_INIT(src/server/lyskomd.h)
AC_PROG_CC
Per Cederqvist's avatar
Per Cederqvist committed
24
AC_SUBST(CFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
25
AC_SUBST(LDFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
26
AC_SUBST(DEPENDFLAG)
27
28
AC_SUBST(INCLUDE_CURRENT)
INCLUDE_CURRENT=-I.
29
30
31
32
33
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
Per Cederqvist's avatar
Per Cederqvist committed
34
[if test -n "$GCC"; then
35
36
37
	] AC_VERBOSE([adding -g -O -ansi -Wall -pipe]) [
	CFLAGS="$CFLAGS -g -O -Wall -ansi"
	] KOM_AC_CC_OPTION([-pipe]) [
Per Cederqvist's avatar
Per Cederqvist committed
38
39
	DEPENDFLAG=-MM
else
40
	] KOM_AC_CC_OPTION([-g]) [
Per Cederqvist's avatar
Per Cederqvist committed
41
42
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
43
			INCLUDE_CURRENT='-I`pwd`';;
Per Cederqvist's avatar
Per Cederqvist committed
44
45
		*) DEPENDFLAG=-M;;
	esac
46
47
fi]
AC_VERBOSE([Setting DEPENDFLAG to $DEPENDFLAG])
Per Cederqvist's avatar
Per Cederqvist committed
48
AC_CONST
Per Cederqvist's avatar
Per Cederqvist committed
49
AC_STDC_HEADERS
50
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
51
52
[#include <sys/types.h>
#include <sys/socket.h>], dnl
53
[struct sockaddr foo;], dnl
54
55
[AC_VERBOSE([No action needed])], dnl IF FOUND
[AC_VERBOSE([Checking for a fix]); dnl IF NOT FOUND
Per Cederqvist's avatar
Per Cederqvist committed
56
57
AC_COMPILE_CHECK([_HPUX_SOURCE to fix problems], dnl
[#define _HPUX_SOURCE
58
#include <sys/types.h>
Per Cederqvist's avatar
Per Cederqvist committed
59
60
#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
61
62
AC_DEFINE([_HPUX_SOURCE]), dnl
[AC_WARN([Cannot find struct sockaddr])])])dnl
63
AC_SUBST(SRCTOPDIR)
64
[SRCTOPDIR=`cd $srcdir;pwd`]
65
AC_SUBST(BUILDTOPDIR)
66
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
67
68
69
70
71
72
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
73
74
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
75
AC_HAVE_HEADERS(stdarg.h stdlib.h stddef.h locale.h)
76
AC_TIME_WITH_SYS_TIME
Per Cederqvist's avatar
Per Cederqvist committed
77
AC_ALLOCA
Per Cederqvist's avatar
Per Cederqvist committed
78
79
80
81
82
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.
83
AC_HAVE_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
84
AC_REPLACE_FUNCS(memcpy strerror remove memset memchr)
85
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
Per Cederqvist's avatar
Per Cederqvist committed
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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
100
101
src/server/Makefile
run-support/Makefile)