Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 268 lines (236 sloc) 8.682 kB
7183c5b from CVS
graziano obertelli authored
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3 #
4
5 # Usage:
6 # configure [--with-axis2c=<dir>]
7 # [--with-axis2=<dir>]
8 # [--with-libvirt=<dir>]
9b1361c Added themability at compile time.
graziano authored
9 # [--with-interface-theme=<name>]
10 # [--enable-appliance-store]
7183c5b from CVS
graziano obertelli authored
11 # [--enable-debug]
12
13 AC_PREREQ(2.61)
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
14 AC_INIT(Eucalyptus,
15 m4_esyscmd([cat VERSION| tr -d '\n']),
9769a39 moved to the new URL
graziano obertelli authored
16 support@open.eucalyptus.com)
7183c5b from CVS
graziano obertelli authored
17 AC_CONFIG_SRCDIR([wsdl/eucalyptus_nc.wsdl])
ecfe55d reanamed config.h to eucalyptus-config.h.
graziano authored
18 AC_CONFIG_HEADER([util/eucalyptus-config.h])
7183c5b from CVS
graziano obertelli authored
19 AC_PREFIX_DEFAULT([/opt/eucalyptus/])
20 AC_USE_SYSTEM_EXTENSIONS
47eb0ff @gholms Re-apply build system changes
gholms authored
21 AC_CANONICAL_BUILD
015eb7c changed VERSION to EUCA_VERSION
graziano authored
22 EUCA_VERSION="`cat VERSION`"
7183c5b from CVS
graziano obertelli authored
23
24 # let's figure out where is the source tree
25 if test ${srcdir} = "." ; then
26 TOP=`pwd`
27 else
28 TOP=${srcdir}
29 fi
30
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
31 # variables we'll need later on
7183c5b from CVS
graziano obertelli authored
32 AXIS2C_HOME="${AXIS2C_HOME}"
33 AXIS2_HOME="${AXIS2_HOME}"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
34 AXIS2C_SERVICES=""
7183c5b from CVS
graziano obertelli authored
35 LIBVIRT_HOME="${LIBVIRT_HOME}"
5cf21dd added --with-vddk option to configure
root authored
36 VDDK_HOME="${VDDK_HOME}"
9b1361c Added themability at compile time.
graziano authored
37 INTERFACE_THEME="eucalyptus"
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
38 EXTENSIONS=""
7183c5b from CVS
graziano obertelli authored
39 ANT=""
40 JAVA=""
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
41 WSDL2C=""
7183c5b from CVS
graziano obertelli authored
42 java_min_version="1.6.0"
43 ant_min_version="1.6.5"
44
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
45 # these are for large files (>2GB)
46 LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
47 LIBS="`getconf LFS64_LIBS` $LIBS"
48 CFLAGS="`getconf LFS64_CFLAGS`"
49
7183c5b from CVS
graziano obertelli authored
50 # compile options
51 CFLAGS="${CFLAGS} -Wall -Wno-unused-variable -fPIC -DHAVE_CONFIG_H"
52 INCLUDES="${INCLUDES} -I. -I.. -Igenerated -I${TOP}/storage -I${TOP}/node -I${TOP}/util -I${TOP}/net"
53
54 # Arguments checking
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
55 AC_ARG_WITH(axis2c,
56 [ --with-axis2c=<dir> where axis2c is installed],
7183c5b from CVS
graziano obertelli authored
57 [AXIS2C_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
58 AC_ARG_WITH(axis2c-services,
59 [ --with-axis2c-services=<dir> where axis2c services are installed],
60 [AXIS2C_SERVICES="${withval}"])
61 AC_ARG_WITH(axis2,
62 [ --with-axis2=<dir> where axis2 is installed],
7183c5b from CVS
graziano obertelli authored
63 [AXIS2_HOME="${withval}"])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
64 AC_ARG_WITH(libvirt,
65 [ --with-libvirt=<dir> where libvirt is installed],
7183c5b from CVS
graziano obertelli authored
66 [LIBVIRT_HOME="${withval}"])
47eb0ff @gholms Re-apply build system changes
gholms authored
67 AC_ARG_WITH(wsdl2c-sh,
68 [ --with-wsdl2c-sh=<file> where WSDL2C.sh is installed],
69 [WSDL2C="${withval}"])
5cf21dd added --with-vddk option to configure
root authored
70 AC_ARG_WITH(vddk,
71 [ --with-vddk=<dir> where VMware's VDDK is installed],
72 [VDDK_HOME="${withval}"])
9b1361c Added themability at compile time.
graziano authored
73 AC_ARG_WITH(interface-theme,
2ebf469 typo in configure.ac
root authored
74 [ --with-interface-theme=<name> the theme to be used],
9b1361c Added themability at compile time.
graziano authored
75 [INTERFACE_THEME="${withval}"])
76 AC_ARG_ENABLE(appliance-store,
77 [ --enable-appliance-store enable the store tab],
78 [if test "${enableval}" != "no"; then
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
79 EXTENSIONS="store"
9b1361c Added themability at compile time.
graziano authored
80 fi])
81
7183c5b from CVS
graziano obertelli authored
82 AC_ARG_ENABLE(debug,
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
83 [ --enable-debug include debugging info when compiling],
7183c5b from CVS
graziano obertelli authored
84 [if test "${enableval}" != "no"; then
85 CFLAGS="$CFLAGS -g -DDEBUG"
86 fi])
87
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
88
89 # If we didn't specify the services directory, let's use the default
be76398 fixed condition
graziano obertelli authored
90 if test -z "$AXIS2C_SERVICES" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
91 AXIS2C_SERVICES="${AXIS2C_HOME}/services"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
92 fi
93
7183c5b from CVS
graziano obertelli authored
94 # Fix the paths for includes and libraries
95 if test -n "${AXIS2C_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
96 if test -d "${AXIS2C_HOME}"/include ; then
97 for x in `ls ${AXIS2C_HOME}/include`; do
98 INCLUDES="${INCLUDES} -I${AXIS2C_HOME}/include/$x"
99 done
100 fi
101 if test -d "${AXIS2C_HOME}"/lib ; then
102 LIBS="-L${AXIS2C_HOME}/lib ${LIBS}"
103 fi
104 if test -d ${AXIS2C_HOME}/modules/rampart ; then
105 LIBS="-L${AXIS2C_HOME}/modules/rampart ${LIBS}"
106 fi
7183c5b from CVS
graziano obertelli authored
107 fi
108 if test -n "${LIBVIRT_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
109 if test -d "${LIBVIRT_HOME}"/include ; then
110 INCLUDES="${INCLUDES} -I${LIBVIRT_HOME}/include"
111 LIBS="-L${LIBVIRT_HOME}/lib ${LIBS}"
112 fi
7183c5b from CVS
graziano obertelli authored
113 fi
5cf21dd added --with-vddk option to configure
root authored
114 if test -n "${VDDK_HOME}" ; then
47eb0ff @gholms Re-apply build system changes
gholms authored
115 AS_IF([test "x$build_cpu" = "xx86_64"], [LIBS="-L${VDDK_HOME}/lib64 ${LIBS}"],
116 [LIBS="-L${VDDK_HOME}/lib32 ${LIBS}"])
117
118 if test -d "${VDDK_HOME}"/include/ ; then
119 INCLUDES="${INCLUDES} -I${VDDK_HOME}/include/"
120 elif test -d "${VDDK_HOME}"/lib/vmware-vix-disklib/include/ ; then
121 INCLUDES="${INCLUDES} -I${VDDK_HOME}/lib/vmware-vix-disklib/include/"
122 fi
5cf21dd added --with-vddk option to configure
root authored
123 fi
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
124
7183c5b from CVS
graziano obertelli authored
125
126 # Checks for programs.
127 AC_PROG_AWK
128 AC_PROG_CC
129 AC_PROG_INSTALL
130 AC_PROG_MAKE_SET
5015556 Fixed spurios commit with extra characters.
graziano obertelli authored
131 AC_PATH_PROG(RM, rm)
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
132
47eb0ff @gholms Re-apply build system changes
gholms authored
133 if test -z "$WSDL2C"; then
134 # let's search for WSDL2C.sh
135 AC_PATH_PROG([WSDL2C], WSDL2C.sh,,$AXIS2C_HOME/bin/tools/wsdl2c:$PATH)
1fe927f @gholms Fix missing WSDL2C lib (attempt 2)
gholms authored
136 fi
47eb0ff @gholms Re-apply build system changes
gholms authored
137 # check if we found WSDL2C.sh
138 if test -z "$WSDL2C" ; then
139 AC_MSG_ERROR([Cannot find WSDL2C.sh!])
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
140 fi
141
142 # we need JAVA_HOME
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
143 if test -z "$JAVA_HOME" ; then
144 AC_MSG_ERROR([JAVA_HOME is not defined!])
145 fi
146
7183c5b from CVS
graziano obertelli authored
147 AC_PATH_PROG([ANT], ant,,$ANT_HOME/bin:$PATH)
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
148 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
7183c5b from CVS
graziano obertelli authored
149
150 # Check the version of java and ant
151 if test -z "$ANT" ; then
152 AC_MSG_ERROR([Cannot find ant!])
153 fi
154 if test -z "$JAVA" ; then
155 AC_MSG_ERROR([Cannot find java!])
156 fi
157 java_version=`$JAVA -version 2>&1 | grep "java version" | \
158 sed -e 's/.*java version "\(.*\)".*/\1/'`
159 goodversion=`expr $java_version ">=" $java_min_version`
160 if test $goodversion -eq 0; then
161 AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
162 fi
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
163
164 # now let's test we have jni.h
165 if test ! -e $JAVA_HOME/include/jni.h ; then
9d27407 debugging the automatic testing scripts
graziano obertelli authored
166 AC_MSG_ERROR([Cannot find jni.h in $JAVA_HOME: do you have a JDK installed?])
ae74452 Added check for JAVA_HOME when building the CLC, and added check for …
graziano obertelli authored
167 fi
168
7183c5b from CVS
graziano obertelli authored
169 ant_version=`$ANT -version 2>&1 | grep "Ant version" | \
170 sed -e 's/.*Ant version \([[0-9.]]*\).*/\1/'`
171 goodversion=`expr $ant_version ">=" $ant_min_version`
172 if test $goodversion -eq 0; then
173 AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
174 fi
175 # some version of ant picks up the wrong java
176 java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \
177 sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
178 goodversion=`expr $java_version ">=" $java_min_version`
179 if test $goodversion -eq 0; then
180 AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
181 fi
182
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
183
7183c5b from CVS
graziano obertelli authored
184 # Checks for libraries.
185 # FIXME: Replace `main' with a function in the library
186 AC_CHECK_LIB([axis2_axiom],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
187 AC_CHECK_LIB([axis2_engine],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
188 AC_CHECK_LIB([axis2_http_common],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
189 AC_CHECK_LIB([axis2_http_receiver],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
190 AC_CHECK_LIB([axis2_http_sender],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
191 AC_CHECK_LIB([guththila],[main],,AC_MSG_ERROR([Cannot find libguththila!]))
192 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
193 AC_CHECK_LIB([axutil],[main],,AC_MSG_ERROR([Cannot find libaxutil]))
194 AC_CHECK_LIB([m],[main])
195 AC_CHECK_LIB([mod_rampart],[main],,AC_MSG_ERROR([Cannot find libmod_rampart]))
196 AC_CHECK_LIB([neethi],[main],,AC_MSG_ERROR([Cannot find libneethi!]))
197 AC_CHECK_LIB([pthread],[main])
198 AC_CHECK_LIB([rt],[main])
ec3f728 We had a too strict dependency on libvirt: fixed it (only NC depends …
graziano obertelli authored
199 AC_CHECK_LIB([virt],[main],true,AC_MSG_ERROR([Cannot find libvirt!]))
200 AC_CHECK_LIB([curl],[main],true,AC_MSG_ERROR([Cannot find libcurl!]))
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
201 AC_CHECK_LIB([z],[inflate])
720650c @dmitrii brought libcap configure check from main
dmitrii authored
202 AC_CHECK_LIB([cap],[cap_from_name],,AC_MSG_WARN([Cannot find sufficiently recent libcap will not use it]))
7183c5b from CVS
graziano obertelli authored
203
204 # Checks for header files.
205 AC_HEADER_DIRENT
206 AC_HEADER_STDC
207 AC_HEADER_SYS_WAIT
c6c771a merged + finished gzip support for Walrus transfers, compiled in if z…
Dmitrii Zagorodnov authored
208 AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h strings.h sys/ioctl.h unistd.h sys/vfs.h zlib.h])
7183c5b from CVS
graziano obertelli authored
209 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
210 dnl AC_CHECK_HEADER([curl/easy.h],,AC_MSG_ERROR([[Cannot find curl/easy.h]]))
211
212 # Checks for typedefs, structures, and compiler characteristics.
213 AC_C_CONST
214 AC_TYPE_MODE_T
215 AC_TYPE_PID_T
216 AC_TYPE_SIZE_T
217 AC_TYPE_SSIZE_T
218 AC_HEADER_TIME
219 AC_STRUCT_TM
220 AC_TYPE_UINT32_T
221
222 # Checks for functions.
223 AC_FUNC_CLOSEDIR_VOID
224 AC_FUNC_FORK
225 AC_FUNC_LSTAT
226 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
227 AC_FUNC_MALLOC
228 AC_FUNC_MEMCMP
229 AC_FUNC_MKTIME
230 AC_FUNC_MMAP
231 AC_FUNC_REALLOC
232 AC_FUNC_SELECT_ARGTYPES
233 AC_FUNC_STAT
234 AC_FUNC_STRNLEN
235 AC_FUNC_VPRINTF
236 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir])
237
238 # Time to substitute and generate the files
239 AC_CONFIG_FILES([Makedefs
ed1f832 first cut at splitting the init.d scripts per service
graziano obertelli authored
240 tools/eucalyptus-cc:tools/eucalyptus-cc.in
241 tools/eucalyptus-nc:tools/eucalyptus-nc.in
b9ee122 euca_conf now searches the conf file in the installed directory
graziano obertelli authored
242 tools/euca_conf:tools/euca_conf.in
efc277f Ready for more testing.
graziano authored
243 tools/eucalyptus-cloud:tools/eucalyptus-cloud.in])
7183c5b from CVS
graziano obertelli authored
244
015eb7c changed VERSION to EUCA_VERSION
graziano authored
245 AC_DEFINE_UNQUOTED(EUCA_VERSION, "$EUCA_VERSION")
7183c5b from CVS
graziano obertelli authored
246
015eb7c changed VERSION to EUCA_VERSION
graziano authored
247 AC_SUBST(EUCA_VERSION)
7183c5b from CVS
graziano obertelli authored
248 AC_SUBST(TOP)
249 AC_SUBST(ANT)
116504e Added uninstall target.
graziano authored
250 AC_SUBST(RM)
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (…
graziano obertelli authored
251 AC_SUBST(WSDL2C)
7183c5b from CVS
graziano obertelli authored
252 AC_SUBST(JAVA_HOME)
253 AC_SUBST(AXIS2C_HOME)
ebcf56d @grze merge changes to support building .deb packages directly from the rep…
grze authored
254 AC_SUBST(AXIS2C_SERVICES)
7183c5b from CVS
graziano obertelli authored
255 AC_SUBST(AXIS2_HOME)
256 AC_SUBST(LIBVIRT_HOME)
5cf21dd added --with-vddk option to configure
root authored
257 AC_SUBST(VDDK_HOME)
7183c5b from CVS
graziano obertelli authored
258 AC_SUBST(CFLAGS)
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
259 AC_SUBST(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
260 AC_SUBST(LIBS)
261 AC_SUBST(INCLUDES)
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
262 AC_SUBST(EXTENSIONS)
9b1361c Added themability at compile time.
graziano authored
263 AC_SUBST(INTERFACE_THEME)
7183c5b from CVS
graziano obertelli authored
264
265
266
267 AC_OUTPUT
Something went wrong with that request. Please try again.