configure.in 2.96 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
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.
AC_REVISION($Id: configure.in,v 1.1 1993/10/07 23:10:16 ceder Exp $)
AC_INIT(src/server/lyskomd.h)
AC_PROG_CC
AC_SUBST(TOPDIR)
[TOPDIR=`cd $srcdir;pwd`]
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 \
	[for i in $(SUBDIRS); do \\\
		if test -d $$i ; then \\\
			echo making] $1 [in directory $$i; \\\
			(cd $$i; $(MAKE) ] $1 [)\\\
		fi; \\\
	done\
']])dnl
dnl
descend(binaries)
descend(clean)
descend(distclean)
descend(depend)
descend(includes)
descend(libraries)
descend(install)
dnl
dnl  Define CLEAN to handle all the "make *clean" rules.
dnl
AC_SUBST(CLEAN)
[CLEAN="$CLEAN_DESCEND\\
$DISTCLEAN_DESCEND"]
dnl
dnl  Enhance "make depend"
dnl
[DEPEND_DESCEND="dependencies:\\
	touch dependencies\\
\\
$DEPEND_DESCEND\\
"]
AC_AIX
AC_DYNIX_SEQ
AC_IRIX_SUN
AC_ISC_POSIX
AC_MINIX
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)
AC_HAVE_HEADERS(string.h memory.h)
dnl AC_USG is used by regex, but is obsolete.
AC_USG
AC_ALLOCA
AC_HAVE_LIBRARY(resolv)
AC_HAVE_LIBRARY(authuser)
AC_HAVE_FUNCS(difftime)
AC_REPLACE_FUNCS(memcpy difftime mktime strerror getdtablesize)
[DEFS="$DEFS -DBUGGY_INET_NTOA=1 -DHAVE_LOCALE=1 -DENCRYPT_PASSWORDS=1 \
	-DSERVER=1"]
AC_SUBST(ALL_DESCEND)
[ALL_DESCEND="$INCLUDES_DESCEND\\
$LIBRARIES_DESCEND\\
$BINARIES_DESCEND\\
$INSTALL_DESCEND\\
$DEPEND_DESCEND\\
$CLEAN\\
"]
AC_SUBST(CFLAGS)
[CFLAGS="$CFLAGS -I$TOPDIR/include -I$TOPDIR/include/server "]
[CFLAGS="$CFLAGS -g -O -Wall -ansi -pipe $DEFS" ]
AC_SUBST(STDLYSKOM)
[STDLYSKOM="SHELL = /bin/sh \\
\\
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\\
\\
srcdir = $srcdir\\
VPATH = $srcdir\\
INCLUDEDIR = $TOPDIR/include\\
LIBDIR = $TOPDIR/lib\\
prefix = /usr/lyskom\\
exec_prefix = $(prefix)\\
bindir = $(exec_prefix)/bin\\
dbdir = $(exec_prefix)/db\\
etcdir = $(exec_prefix)/etc\\
coredir = $(exec_prefix)/cores\\
\\
DEFS = $DEFS\\
LDFLAGS = $LDFLAGS\\
SCRIPTDIR = $TOPDIR/scripts\\
"]
[rm -rf $srcdir/include
mkdir $srcdir/include]
[mkdir $srcdir/lib]
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
src/server/Makefile
)