configure.in 3.84 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
2
3
4
dnl Process this file with autoconf to produce a configure script.
dnl This configure.in was derived from the configure.in in the
dnl GNU regex package, rel 0.11.  Since LysKOM uses that package,
dnl this configure script must include everything it needs.
5
AC_REVISION($Id: configure.in,v 1.6 1993/10/12 23:22:44 ceder Exp $)
Per Cederqvist's avatar
Per Cederqvist committed
6
7
AC_INIT(src/server/lyskomd.h)
AC_PROG_CC
8
9
10
11
12
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_DYNIX_SEQ
AC_IRIX_SUN
13
14
15
16
17
18
19
20
21
22
23
AC_COMPILE_CHECK([HPUX and struct sockaddr], dnl
[#include <sys/socket.h>], dnl
[struct sockaddr foo;], dnl
[test -n "$verbose" && echo '	'No action needed], dnl
[test -n "$verbose" && echo '	'Checking for a fix; dnl
  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
)])dnl
24
25
[SRCTOPDIR=`cd $srcdir;pwd`]
[BUILDTOPDIR=`pwd`]
Per Cederqvist's avatar
Per Cederqvist committed
26
27
28
29
30
31
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 \
32
	[for i in DuMmY $(SUBDIRS); do \\\
Per Cederqvist's avatar
Per Cederqvist committed
33
34
35
36
37
38
39
40
		if test -d $$i ; then \\\
			echo making] $1 [in directory $$i; \\\
			(cd $$i; $(MAKE) ] $1 [)\\\
		fi; \\\
	done\
']])dnl
dnl
descend(binaries)
41
descend(mostlyclean)
Per Cederqvist's avatar
Per Cederqvist committed
42
43
descend(clean)
descend(distclean)
44
45
descend(realclean)
descend(pure)
Per Cederqvist's avatar
Per Cederqvist committed
46
47
48
49
50
51
52
53
descend(depend)
descend(includes)
descend(libraries)
descend(install)
dnl
dnl  Define CLEAN to handle all the "make *clean" rules.
dnl
AC_SUBST(CLEAN)
54
55
56
57
58
[CLEAN="$MOSTLYCLEAN_DESCEND\\
$CLEAN_DESCEND\\
$DISTCLEAN_DESCEND\\
$REALCLEAN_DESCEND\\
$PURE_DESCEND"]
Per Cederqvist's avatar
Per Cederqvist committed
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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
AC_STDC_HEADERS
AC_PROGRAMS_CHECK(SED, /usr/gnu/bin/sed /usr/local/gnu/bin/sed sed)
75
AC_HAVE_HEADERS(string.h memory.h sys/param.h sys/time.h stdlib.h locale.h)
76
AC_TIME_WITH_SYS_TIME
Per Cederqvist's avatar
Per Cederqvist committed
77
78
79
80
81
dnl AC_USG is used by regex, but is obsolete.
AC_USG
AC_ALLOCA
AC_HAVE_LIBRARY(resolv)
AC_HAVE_LIBRARY(authuser)
82
83
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(nsl)
84
85
AC_HAVE_FUNCS(difftime getdtablesize sysconf getcwd vfprintf)
AC_REPLACE_FUNCS(memcpy difftime strerror remove strchr memset memchr)
86
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DENCRYPT_PASSWORDS=1 -DSERVER=1"]
Per Cederqvist's avatar
Per Cederqvist committed
87
88
89
90
91
92
93
94
95
AC_SUBST(ALL_DESCEND)
[ALL_DESCEND="$INCLUDES_DESCEND\\
$LIBRARIES_DESCEND\\
$BINARIES_DESCEND\\
$INSTALL_DESCEND\\
$DEPEND_DESCEND\\
$CLEAN\\
"]
AC_SUBST(CFLAGS)
96
97
[CFLAGS="$CFLAGS -I$BUILDTOPDIR/include -I$BUILDTOPDIR/include/server -I. "]
[CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe \$(DEFS)" ]
Per Cederqvist's avatar
Per Cederqvist committed
98
AC_SUBST(STDLYSKOM)
99
100
[STDLYSKOM="# BEGIN section from @STDLYSKOM@\\
SHELL = /bin/sh \\
Per Cederqvist's avatar
Per Cederqvist committed
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
\\
AWK = $AWK\\
CC = $CC\\
CFLAGS = $CFLAGS\\
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\\
\\
117
118
INCLUDEDIR = $BUILDTOPDIR/include\\
LIBDIR = $BUILDTOPDIR/lib\\
Per Cederqvist's avatar
Per Cederqvist committed
119
prefix = /usr/lyskom\\
120
121
122
123
124
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
125
126
127
\\
DEFS = $DEFS\\
LDFLAGS = $LDFLAGS\\
128
129
130
131
SCRIPTDIR = $SRCTOPDIR/scripts\\
GENERIC-MOSTLYCLEAN = *.o lib*.a core temp-Makefile temp-?-Makefile\\
GENERIC-DISTCLEAN = *~ TAGS dependencies Makefile\\
# END section from @STDLYSKOM@\\
Per Cederqvist's avatar
Per Cederqvist committed
132
"]
133
[mkdir $BUILDTOPDIR/include]
134
[mkdir $BUILDTOPDIR/lib]
Per Cederqvist's avatar
Per Cederqvist committed
135
136
137
138
139
140
141
142
143
144
145
146
147
148
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
149
150
src/libraries/regex/doc/Makefile
src/libraries/regex/test/Makefile
151
src/server/Makefile)