configure.in 4.52 KB
Newer Older
1
dnl $Id: configure.in,v 1.13 1994/02/24 11:47:01 ceder Exp $
2
dnl Configuration for LysKOM
3
AC_REVISION($Revision: 1.13 $)
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
8
9
10
AC_SUBST(DEPENDFLAG)
include_current=-I.
[if test -n "$GCC"; then
	test -n "$verbose" && echo adding -g -O -ansi -Wall -pipe
Per Cederqvist's avatar
Per Cederqvist committed
11
	CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe"
Per Cederqvist's avatar
Per Cederqvist committed
12
13
14
15
16
17
18
19
20
21
22
	DEPENDFLAG=-MM
else
	test -n "$verbose" && echo adding -g
	CFLAGS="$CFLAGS -g"
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
			include_current='-I`pwd`';;
		*) DEPENDFLAG=-M;;
	esac
fi
test -n "$verbose" && echo Setting DEPENDFLAG to $DEPENDFLAG]
23
24
25
26
27
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
Per Cederqvist's avatar
Per Cederqvist committed
28
AC_CONST
Per Cederqvist's avatar
Per Cederqvist committed
29
AC_STDC_HEADERS
30
31
32
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
[#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
Per Cederqvist's avatar
Per Cederqvist committed
33
34
35
36
37
38
39
40
[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
41
42
[SRCTOPDIR=`cd $srcdir;pwd`]
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
43
44
45
46
47
48
dnl
dnl descend(foo) will define FOO_DESCEND as a Makefile excerpt
dnl
define([descend], [AC_SUBST(translit($1, [a-z], [A-Z])[_DESCEND])
translit($1, [a-z], [A-Z])[_DESCEND='.PHONY: ]$1 \
$1: [do]$1 \
49
	[for i in DuMmY $(SUBDIRS); do \\\
Per Cederqvist's avatar
Per Cederqvist committed
50
51
52
53
54
55
56
57
		if test -d $$i ; then \\\
			echo making] $1 [in directory $$i; \\\
			(cd $$i; $(MAKE) ] $1 [)\\\
		fi; \\\
	done\
']])dnl
dnl
descend(binaries)
58
descend(mostlyclean)
Per Cederqvist's avatar
Per Cederqvist committed
59
60
descend(clean)
descend(distclean)
61
62
descend(realclean)
descend(pure)
Per Cederqvist's avatar
Per Cederqvist committed
63
64
65
66
67
68
69
70
descend(depend)
descend(includes)
descend(libraries)
descend(install)
dnl
dnl  Define CLEAN to handle all the "make *clean" rules.
dnl
AC_SUBST(CLEAN)
71
72
73
74
[CLEAN="$MOSTLYCLEAN_DESCEND\\
$CLEAN_DESCEND\\
$DISTCLEAN_DESCEND\\
$REALCLEAN_DESCEND\\
75
76
77
$PURE_DESCEND\\
GENERIC-MOSTLYCLEAN = *.o lib*.a core temp-Makefile temp-?-Makefile\\
GENERIC-DISTCLEAN = *~ .\\\\#* TAGS dependencies Makefile"]
Per Cederqvist's avatar
Per Cederqvist committed
78
79
80
81
82
83
84
85
86
87
88
89
90
91
dnl
dnl  Enhance "make depend"
dnl
[DEPEND_DESCEND="dependencies:\\
	touch dependencies\\
\\
$DEPEND_DESCEND\\
"]
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
92
93
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
94
AC_HAVE_HEADERS(stdarg.h stdlib.h stddef.h locale.h)
95
AC_TIME_WITH_SYS_TIME
Per Cederqvist's avatar
Per Cederqvist committed
96
AC_ALLOCA
Per Cederqvist's avatar
Per Cederqvist committed
97
98
99
100
101
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.
102
103
AC_HAVE_FUNCS(difftime getdtablesize sysconf getcwd vfprintf)
AC_REPLACE_FUNCS(memcpy difftime strerror remove strchr memset memchr)
104
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
Per Cederqvist's avatar
Per Cederqvist committed
105
106
107
108
109
110
111
112
AC_SUBST(ALL_DESCEND)
[ALL_DESCEND="$INCLUDES_DESCEND\\
$LIBRARIES_DESCEND\\
$BINARIES_DESCEND\\
$INSTALL_DESCEND\\
$DEPEND_DESCEND\\
$CLEAN\\
"]
Per Cederqvist's avatar
Per Cederqvist committed
113
114
115
[CFLAGS="$CFLAGS $include_current -I\$(srcdir)"]
[CFLAGS="$CFLAGS -I$BUILDTOPDIR/include -I$BUILDTOPDIR/include/server"]
[CFLAGS="$CFLAGS -I/usr/local/include"]
Per Cederqvist's avatar
Per Cederqvist committed
116
117
118
119
120
dnl Adding DEFS to CFLAGS must be the last thing done to CFLAGS,
dnl since it breaks the compile tests generated by autoconf.
dnl +++This probably violates the GNU Coding Standards as well,
dnl and should be fixed before the upcoming release.
[CFLAGS="$CFLAGS \$(DEFS)" ]
Per Cederqvist's avatar
Per Cederqvist committed
121
AC_SUBST(STDLYSKOM)
122
123
[STDLYSKOM="# BEGIN section from @STDLYSKOM@\\
SHELL = /bin/sh \\
Per Cederqvist's avatar
Per Cederqvist committed
124
125
126
127
\\
AWK = $AWK\\
CC = $CC\\
CFLAGS = $CFLAGS\\
Per Cederqvist's avatar
Per Cederqvist committed
128
DEPENDFLAG = $DEPENDFLAG\\
Per Cederqvist's avatar
Per Cederqvist committed
129
130
131
132
133
134
135
136
137
138
139
140
INSTALL = $INSTALL\\
INSTALL_DATA = $INSTALL_DATA\\
INSTALL_PROGRAM = $INSTALL_PROGRAM\\
LEX = $LEX\\
MKDIR = mkdir\\
RANLIB = $RANLIB\\
RM = rm -f\\
SED = $SED\\
SYMLINK = $LN_S\\
TOUCHLIB = $RANLIB\\
YACC = $YACC\\
\\
141
142
INCLUDEDIR = $BUILDTOPDIR/include\\
LIBDIR = $BUILDTOPDIR/lib\\
Per Cederqvist's avatar
Per Cederqvist committed
143
prefix = /usr/lyskom\\
144
145
146
147
148
exec_prefix = \$(prefix)\\
bindir = \$(exec_prefix)/bin\\
dbdir = \$(exec_prefix)/db\\
etcdir = \$(exec_prefix)/etc\\
coredir = \$(exec_prefix)/cores\\
Per Cederqvist's avatar
Per Cederqvist committed
149
150
151
\\
DEFS = $DEFS\\
LDFLAGS = $LDFLAGS\\
152
153
SCRIPTDIR = $SRCTOPDIR/scripts\\
# END section from @STDLYSKOM@\\
Per Cederqvist's avatar
Per Cederqvist committed
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
"]
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
169
170
src/libraries/regex/doc/Makefile
src/libraries/regex/test/Makefile
171
src/server/Makefile)