configure.in 3.77 KB
Newer Older
1
dnl $Id: configure.in,v 1.27 1995/10/23 06:57:14 ceder Exp $
2
dnl Configuration for LysKOM
3
dnl Copyright (C) 1993, 1994, 1995  Lysator Academic Computer Association.
Per Cederqvist's avatar
Per Cederqvist committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.27 $)
Per Cederqvist's avatar
Per Cederqvist committed
22
AC_INIT(src/server/lyskomd.h)
23
AC_PREFIX_DEFAULT(/usr/lyskom)
Per Cederqvist's avatar
Per Cederqvist committed
24
AC_PROG_CC
Per Cederqvist's avatar
Per Cederqvist committed
25
AC_SUBST(CFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
26
AC_SUBST(CPPFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
27
AC_SUBST(LDFLAGS)
Per Cederqvist's avatar
Per Cederqvist committed
28
AC_SUBST(DEPENDFLAG)
29
30
AC_SUBST(INCLUDE_CURRENT)
INCLUDE_CURRENT=-I.
31
32
33
AC_AIX
AC_ISC_POSIX
AC_MINIX
Per Cederqvist's avatar
Per Cederqvist committed
34
[if test -n "$GCC"; then
Per Cederqvist's avatar
Per Cederqvist committed
35
	CFLAGS="$CFLAGS -Wall -ansi"
36
37
	] AC_DEFINE(_GNU_SOURCE)
	KOM_COMPILER_CC_ACCEPTS([-pipe]) [
Per Cederqvist's avatar
Per Cederqvist committed
38
39
40
41
	DEPENDFLAG=-MM
else
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
42
			INCLUDE_CURRENT='-I`pwd`';;
Per Cederqvist's avatar
Per Cederqvist committed
43
44
		*) DEPENDFLAG=-M;;
	esac
45
fi]
Per Cederqvist's avatar
Per Cederqvist committed
46
47
48
49
AC_MSG_CHECKING([flag to get dependencies])
AC_MSG_RESULT([$DEPENDFLAG])
AC_C_CONST
AC_HEADER_STDC
Per Cederqvist's avatar
Per Cederqvist committed
50
AC_TYPE_PID_T
Per Cederqvist's avatar
Per Cederqvist committed
51
52
53
AC_MSG_CHECKING([if _HPUX_SOURCE needs to be defined])
AC_CACHE_VAL([kom_cv_sys_hpux_source],
[AC_TRY_LINK(
54
[#include <sys/types.h>
Per Cederqvist's avatar
Per Cederqvist committed
55
56
57
58
59
#include <sys/socket.h>],
[struct sockaddr foo;],
[kom_cv_sys_hpux_source=no], dnl IF FOUND
[dnl IF NOT FOUND
AC_TRY_LINK(
Per Cederqvist's avatar
Per Cederqvist committed
60
[#define _HPUX_SOURCE
61
#include <sys/types.h>
Per Cederqvist's avatar
Per Cederqvist committed
62
63
64
65
66
67
68
69
#include <sys/socket.h>],
[struct sockaddr foo;],
[kom_cv_sys_hpux_source=yes],
[kom_cv_sys_hpux_source=no])])])
AC_MSG_RESULT($kom_cv_sys_hpux_source)
[if test $kom_cv_sys_hpux_source = yes ; then]
  AC_DEFINE(_HPUX_SOURCE)
[fi]
70
AC_SUBST(SRCTOPDIR)
71
[SRCTOPDIR=`cd $srcdir;pwd`]
72
AC_SUBST(BUILDTOPDIR)
73
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
74
AC_CONFIG_AUX_DIR(scripts)
Per Cederqvist's avatar
Per Cederqvist committed
75
76
77
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_PROG_AWK
Per Cederqvist's avatar
Per Cederqvist committed
78
AC_PROG_LN_S
Per Cederqvist's avatar
Per Cederqvist committed
79
80
AC_PROG_YACC
AC_PROG_LEX
Per Cederqvist's avatar
Per Cederqvist committed
81
82
83
84
85
86
87
88
AC_CHECK_PROGS(SED, sed)
AC_CHECK_HEADERS(string.h memory.h strings.h sys/param.h sys/time.h)
AC_CHECK_HEADERS(stdarg.h stdlib.h stddef.h locale.h sys/resource.h)
AC_HEADER_TIME
AC_FUNC_ALLOCA
AC_CHECK_LIB(resolv,main) dnl Host name lookup.
AC_CHECK_LIB(authuser,auth_tcpuser3) dnl User authentication according to RFC 931.
AC_CHECK_LIB(socket,socket) dnl socket() et c on Solaris 2.
Per Cederqvist's avatar
Per Cederqvist committed
89
AC_CHECK_LIB(nsl,gethostbyname) dnl Low-level networking code on Solaris 2.
Per Cederqvist's avatar
Per Cederqvist committed
90
91
92
AC_CHECK_LIB(i,setlocale) dnl For setlocale() on Ultrix.
AC_CHECK_FUNCS(difftime getdtablesize sysconf strchr getcwd vfprintf)
AC_CHECK_FUNCS(setrlimit)
Per Cederqvist's avatar
Per Cederqvist committed
93
AC_REPLACE_FUNCS(memcpy strerror remove memset memchr setsid)
Per Cederqvist's avatar
Per Cederqvist committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
dnl
dnl I don't know how to test for buggy inet_ntoa functions
dnl programmatically, but the supplied substitute should always work,
dnl so we define BUGGY_INET_NTOA unconditionally.
AC_DEFINE(BUGGY_INET_NTOA)
dnl
dnl Unencryptet passwords are no longer supported.
AC_DEFINE(ENCRYPT_PASSWORDS)
dnl
dnl Once upon a time, the server shared some code with the tty-client.
dnl Because of that, you still have to define SERVER while compiling
dnl some of the files in this package.  Nowadays sharing is done by copying.
AC_DEFINE(SERVER)
dnl
Per Cederqvist's avatar
Per Cederqvist committed
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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
122
123
src/server/Makefile
run-support/Makefile)