-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure.in
183 lines (148 loc) · 3.87 KB
/
configure.in
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
dnl $Id$
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
AC_INIT(config.h.in)
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE(dsdc, 0.26)
AM_CONFIG_HEADER(config.h)
DSDC_SET_VERSION
SFS_INIT_LDVERSION(10000,OKWS_ABI_VERSION)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC([clang gcc cc])
AC_PROG_CPP
AC_PROG_CXX([clang++ g++ c++])
SFS_WFLAGS
OKWS_EXPAT
OKWS_SSL
SFS_PATH_CPP
AC_PROG_INSTALL_C
AC_PROG_LN_S
AC_PATH_PROG(PERL, perl, perl)
AC_PATH_PROGS(M4, gm4 gnum4 m4, '$(top_srcdir)/missing')
AC_PATH_PROGS(UPTIME, uptime, '$(top_srcdir)/missing')
test "$RPCC" || RPCC='/usr/local/bin/rpcc'
dnl
dnl OKWS_TAG might set "with_sfs", so it should come before
dnl SFS_SFS, which will reset it if needs be
dnl
SFS_TAG
# XXX - next line seems to be required for some autoconf/-make/libtool versions
test -z "$target" && target=NONE
AC_DISABLE_SHARED
AM_PROG_LIBTOOL
AM_CONDITIONAL(STATIC, test "$enable_shared" != yes)
SFS_SFS
SFS_FIND_RESOLV
dnl
dnl sfslibdir and sfsinclude dir are set in SFS_SFS with the appropriate
dnl sfslite-style tag, if required.
dnl
sfsexecdir="$sfslibdir"
CPPFLAG="$CPPFLAGS -DEXECDIR="'\"$(sfsexecdir)\"'
AC_SUBST(sfsexecdir)
SFS_CFLAGS
dnl prefer c++11
dnl
SFS_CPP11_IF_POSSIBLE
dnl
CPPFLAGS="$CPPFLAGS -I"'$(top_srcdir)'
dnl
dnl for .x files, need header in build directory; add new includes FIRST;
dnl otherwise, compiling from source after an install will look for the
dnl files in installed directory --- not what we want
dnl
for lib in libdsdc; do
CPPFLAGS=" -I"'$(top_builddir)'"/$lib $CPPFLAGS"
done
dnl
dnl library directories
dnl
for lib in libdsdc; do
CPPFLAGS="-I"'$(top_srcdir)'"/$lib $CPPFLAGS"
done
#
# MK Note: It's idiotic to put cupid-specific protocols and code
# in this directory, but the curse of Alfred lives on.
#
OKWS_TAG
saved_LDADD="$LDADD"
saved_LDEPS="$LDEPS"
OKWS_OKWS
#
# Enable pthreads if the user asked for it
#
DSDC_PTHREAD
dnl
dnl Must make changes to LDADD after calling OKWS_OKWS, otherwise,
dnl static builds will fail.
dnl
LIBDSDC='$(top_builddir)/libdsdc/libdsdc.la'
LDADD='$(LIBDSDC) '"$LDADD"
if test "$enable_shared" = yes; then
LDEPS=
else
LDEPS='$(LIBDSDC) '"$LDEPS"
fi
DSDC_MODULE
dnl
dnl Do the layout version and use the short version for install
dnl
SFS_LAYOUT_VERSION
SHORTVERSION=`echo ${layoutversion} | awk -F. '{ print $1 "." $2 }' `
AC_SUBST(SHORTVERSION)
dsdcexecdir='${dsdctopdir}'
dsdctopdir='${module_prefix}/${module_name}/${SHORTVERSION}/${sfstag}'
dsdclinkto='${module_prefix}/${module_name}/${SHORTVERSION}'
dsdclinkfrom='${module_prefix}/${module_name}/current'
dsdclibdir='${dsdctopdir}/lib'
dsdcincludedir='${dsdctopdir}/include'
OKWS_MODULE
OKJAILDIR
#
# XXX: CUPID!!! If you turn this on, it should disable CUPID hooks.
#
DSDC_NO_CUPID=NO
if test "$DSDC_NO_CUPID" = "YES"; then
AM_CONDITIONAL(DSDC_NO_CUPID, true)
CPPFLAGS="$CPPFLAGS -DDSDC_NO_CUPID"
RPCC="$RPCC -DDSDC_NO_CUPID"
LDADD="$saved_LDADD"
LDEPS="$saved_LDEPS"
else
RPCC="$XMLRPCC"
AM_CONDITIONAL(DSDC_NO_CUPID, false)
fi
dnl
dnl allow executables to be dumped into system bin, despite a non-standard
dnl tag situation
dnl
DSDC_SYSTEMBIN
if test -z "$sfstag" -o "$dsdc_systembin" = "yes" ; then
dsdcexecbindir='${prefix}/bin'
else
dsdcexecbindir='${dsdctopdir}/bin'
fi
# We need to keep evaluating this thing to get all of the '$'s out
# Can't just do it once, since there are nested guys...
D="${dsdcexecbindir}"
last_D=""
while test "$last_D" != "$D"; do
last_D=$D
eval "D=$D"
done
AC_DEFINE_UNQUOTED(DSDC_EXEC_BINDIR, "$D", DSDC Executable bin dir)
ETAGS_ARGS='-C /dev/null'
AC_SUBST(LIBDSDC)
AC_SUBST(okm_prefix)
AC_SUBST(okm_name)
AC_SUBST(dsdctopdir)
AC_SUBST(dsdclibdir)
AC_SUBST(dsdcexecbindir)
AC_SUBST(dsdcexecdir)
AC_SUBST(dsdcincludedir)
AC_SUBST(dsdclinkto)
AC_SUBST(dsdclinkfrom)
AC_OUTPUT(libdsdc/Makefile dsdc/Makefile tst/Makefile Makefile)