configure.in 3.14 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
dnl $Id: configure.in,v 1.18 1994/04/05 07:50:44 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
21
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
AC_REVISION($Revision: 1.18 $)
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.
Per Cederqvist's avatar
Per Cederqvist committed
29
30
[if test -n "$GCC"; then
	test -n "$verbose" && echo adding -g -O -ansi -Wall -pipe
Per Cederqvist's avatar
Per Cederqvist committed
31
	CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe"
Per Cederqvist's avatar
Per Cederqvist committed
32
33
34
35
36
37
	DEPENDFLAG=-MM
else
	test -n "$verbose" && echo adding -g
	CFLAGS="$CFLAGS -g"
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
38
			INCLUDE_CURRENT='-I`pwd`';;
Per Cederqvist's avatar
Per Cederqvist committed
39
40
41
42
		*) DEPENDFLAG=-M;;
	esac
fi
test -n "$verbose" && echo Setting DEPENDFLAG to $DEPENDFLAG]
43
44
45
46
47
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
Per Cederqvist's avatar
Per Cederqvist committed
48
AC_CONST
Per Cederqvist's avatar
Per Cederqvist committed
49
AC_STDC_HEADERS
50
51
52
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
[#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
Per Cederqvist's avatar
Per Cederqvist committed
53
54
55
56
57
58
59
60
[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
61
AC_SUBST(SRCTOPDIR)
62
[SRCTOPDIR=`cd $srcdir;pwd`]
63
AC_SUBST(BUILDTOPDIR)
64
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
65
66
67
68
69
70
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
71
72
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
73
AC_HAVE_HEADERS(stdarg.h stdlib.h stddef.h locale.h)
74
AC_TIME_WITH_SYS_TIME
Per Cederqvist's avatar
Per Cederqvist committed
75
AC_ALLOCA
Per Cederqvist's avatar
Per Cederqvist committed
76
77
78
79
80
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.
81
AC_HAVE_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
82
AC_REPLACE_FUNCS(memcpy strerror remove memset memchr)
83
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
Per Cederqvist's avatar
Per Cederqvist committed
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
98
99
src/server/Makefile
run-support/Makefile)