Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 251 lines (219 sloc) 7.955 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 chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
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
015eb7c changed VERSION to EUCA_VERSION
graziano authored
21 EUCA_VERSION="`cat VERSION`"
7183c5b from CVS
graziano obertelli authored
22
23 # let's figure out where is the source tree
24 if test ${srcdir} = "." ; then
25 TOP=`pwd`
26 else
27 TOP=${srcdir}
28 fi
29
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
30 # variables we'll need later on
7183c5b from CVS
graziano obertelli authored
31 AXIS2C_HOME="${AXIS2C_HOME}"
32 AXIS2_HOME="${AXIS2_HOME}"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
33 AXIS2C_SERVICES=""
7183c5b from CVS
graziano obertelli authored
34 LIBVIRT_HOME="${LIBVIRT_HOME}"
9b1361c Added themability at compile time.
graziano authored
35 INTERFACE_THEME="eucalyptus"
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
36 EXTENSIONS=""
7183c5b from CVS
graziano obertelli authored
37 ANT=""
38 JAVA=""
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (jav...
graziano obertelli authored
39 WSDL2C=""
7183c5b from CVS
graziano obertelli authored
40 java_min_version="1.6.0"
41 ant_min_version="1.6.5"
42
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
43 # these are for large files (>2GB)
44 LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
45 LIBS="`getconf LFS64_LIBS` $LIBS"
46 CFLAGS="`getconf LFS64_CFLAGS`"
47
7183c5b from CVS
graziano obertelli authored
48 # compile options
49 CFLAGS="${CFLAGS} -Wall -Wno-unused-variable -fPIC -DHAVE_CONFIG_H"
50 INCLUDES="${INCLUDES} -I. -I.. -Igenerated -I${TOP}/storage -I${TOP}/node -I${TOP}/util -I${TOP}/net"
51
52 # Arguments checking
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
53 AC_ARG_WITH(axis2c,
54 [ --with-axis2c=<dir> where axis2c is installed],
7183c5b from CVS
graziano obertelli authored
55 [AXIS2C_HOME="${withval}"])
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
56 AC_ARG_WITH(axis2c-services,
57 [ --with-axis2c-services=<dir> where axis2c services are installed],
58 [AXIS2C_SERVICES="${withval}"])
59 AC_ARG_WITH(axis2,
60 [ --with-axis2=<dir> where axis2 is installed],
7183c5b from CVS
graziano obertelli authored
61 [AXIS2_HOME="${withval}"])
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
62 AC_ARG_WITH(libvirt,
63 [ --with-libvirt=<dir> where libvirt is installed],
7183c5b from CVS
graziano obertelli authored
64 [LIBVIRT_HOME="${withval}"])
9b1361c Added themability at compile time.
graziano authored
65 AC_ARG_WITH(interface-theme,
2ebf469 typo in configure.ac
root authored
66 [ --with-interface-theme=<name> the theme to be used],
9b1361c Added themability at compile time.
graziano authored
67 [INTERFACE_THEME="${withval}"])
68 AC_ARG_ENABLE(appliance-store,
69 [ --enable-appliance-store enable the store tab],
70 [if test "${enableval}" != "no"; then
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
71 EXTENSIONS="store"
9b1361c Added themability at compile time.
graziano authored
72 fi])
73
7183c5b from CVS
graziano obertelli authored
74 AC_ARG_ENABLE(debug,
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
75 [ --enable-debug include debugging info when compiling],
7183c5b from CVS
graziano obertelli authored
76 [if test "${enableval}" != "no"; then
77 CFLAGS="$CFLAGS -g -DDEBUG"
78 fi])
79
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
80
81 # If we didn't specify the services directory, let's use the default
be76398 fixed condition
graziano obertelli authored
82 if test -z "$AXIS2C_SERVICES" ; then
249929e yet another typo
graziano obertelli authored
83 AXIS2C_SERVICES="${AXIS2C_HOME}/services"
94686a6 be sure AXIS2C_SERVICES is defined
graziano obertelli authored
84 fi
85
7183c5b from CVS
graziano obertelli authored
86 # Fix the paths for includes and libraries
87 if test -n "${AXIS2C_HOME}" ; then
88 if test -d "${AXIS2C_HOME}"/include ; then
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
89 for x in `ls ${AXIS2C_HOME}/include`; do
7183c5b from CVS
graziano obertelli authored
90 INCLUDES="${INCLUDES} -I${AXIS2C_HOME}/include/$x"
91 done
92 LIBS="-L${AXIS2C_HOME}/lib ${LIBS}"
93 fi
94 fi
95 if test -n "${LIBVIRT_HOME}" ; then
96 if test -d "${LIBVIRT_HOME}"/include ; then
97 INCLUDES="${INCLUDES} -I${LIBVIRT_HOME}/include"
98 LIBS="-L${LIBVIRT_HOME}/lib ${LIBS}"
99 fi
100 fi
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
101
7183c5b from CVS
graziano obertelli authored
102
103 # Checks for programs.
104 AC_PROG_AWK
105 AC_PROG_CC
106 AC_PROG_INSTALL
107 AC_PROG_MAKE_SET
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
108
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (jav...
graziano obertelli authored
109 # let's search for WSDL2C.sh
110 # we cannot use AC_PROG_PATH because WSDL2C.sh is not executable
111 #AC_PATH_PROG([WSDL2C], WSDL2C.sh,,$AXIS2C_HOME/bin/tools/wsdl2c:$PATH)
112 WSDL2C=$AXIS2C_HOME/bin/tools/wsdl2c/WSDL2C.sh
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
113 ALT_WSDL2C=$AXIS2C_HOME/WSDL2C.sh
114 AC_CHECK_FILE($WSDL2C,[HAVE_WSDL2C=yes])
115 AC_CHECK_FILE($ALT_WSDL2C,[HAVE_ALT_WSDL2C=yes])
116 # check if we found either of the possible WSDL2Cs
5515ccc made the wsdl2c in the installed axis2c to be the preferred one.
graziano obertelli authored
117 if test -z "$HAVE_WSDL2C$HAVE_ALT_WSDL2C" ; then
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
118 AC_MSG_ERROR([Cannot find WSDL2C.sh!])
119 fi
120 # made it here: we found one! -- set WSDL2C if the default location is wrong
5515ccc made the wsdl2c in the installed axis2c to be the preferred one.
graziano obertelli authored
121 if test -n "$HAVE_ALT_WSDL2C" ; then
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
122 WSDL2C=$ALT_WSDL2C
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (jav...
graziano obertelli authored
123 fi
124
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
125
126 # we need JAVA_HOME
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
127 if test -z "$JAVA_HOME" ; then
128 AC_MSG_ERROR([JAVA_HOME is not defined!])
129 fi
130
7183c5b from CVS
graziano obertelli authored
131 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
132 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
7183c5b from CVS
graziano obertelli authored
133
134 # Check the version of java and ant
135 if test -z "$ANT" ; then
136 AC_MSG_ERROR([Cannot find ant!])
137 fi
138 if test -z "$JAVA" ; then
139 AC_MSG_ERROR([Cannot find java!])
140 fi
141 java_version=`$JAVA -version 2>&1 | grep "java version" | \
142 sed -e 's/.*java version "\(.*\)".*/\1/'`
143 goodversion=`expr $java_version ">=" $java_min_version`
144 if test $goodversion -eq 0; then
145 AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
146 fi
ae74452 Added check for JAVA_HOME when building the CLC, and added check for jni...
graziano obertelli authored
147
148 # now let's test we have jni.h
149 if test ! -e $JAVA_HOME/include/jni.h ; then
9d27407 debugging the automatic testing scripts
graziano obertelli authored
150 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 jni...
graziano obertelli authored
151 fi
152
7183c5b from CVS
graziano obertelli authored
153 ant_version=`$ANT -version 2>&1 | grep "Ant version" | \
154 sed -e 's/.*Ant version \([[0-9.]]*\).*/\1/'`
155 goodversion=`expr $ant_version ">=" $ant_min_version`
156 if test $goodversion -eq 0; then
157 AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
158 fi
159 # some version of ant picks up the wrong java
160 java_version=`$ANT -diagnostics 2>&1 | grep ^java.version | \
161 sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
162 goodversion=`expr $java_version ">=" $java_min_version`
163 if test $goodversion -eq 0; then
164 AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
165 fi
166
3bb2cd5 Closes #48? Check JAVA_HOME at configure time, and carry it over as a
graziano obertelli authored
167
7183c5b from CVS
graziano obertelli authored
168 # Checks for libraries.
169 # FIXME: Replace `main' with a function in the library
170 AC_CHECK_LIB([axis2_axiom],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
171 AC_CHECK_LIB([axis2_engine],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
172 AC_CHECK_LIB([axis2_http_common],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
173 AC_CHECK_LIB([axis2_http_receiver],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
174 AC_CHECK_LIB([axis2_http_sender],[main],,AC_MSG_ERROR([Cannot find axis2 libs!]))
175 AC_CHECK_LIB([guththila],[main],,AC_MSG_ERROR([Cannot find libguththila!]))
176 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
177 AC_CHECK_LIB([axutil],[main],,AC_MSG_ERROR([Cannot find libaxutil]))
178 AC_CHECK_LIB([m],[main])
179 AC_CHECK_LIB([mod_rampart],[main],,AC_MSG_ERROR([Cannot find libmod_rampart]))
180 AC_CHECK_LIB([neethi],[main],,AC_MSG_ERROR([Cannot find libneethi!]))
181 AC_CHECK_LIB([omxmlsec],[main],,AC_MSG_ERROR([Cannot find libomxmlsec!]))
182 AC_CHECK_LIB([oxstokens],[main],,AC_MSG_ERROR([Cannot find liboxstokens!]))
183 AC_CHECK_LIB([pthread],[main])
184 AC_CHECK_LIB([rt],[main])
ec3f728 We had a too strict dependency on libvirt: fixed it (only NC depends on ...
graziano obertelli authored
185 AC_CHECK_LIB([virt],[main],true,AC_MSG_ERROR([Cannot find libvirt!]))
186 AC_CHECK_LIB([curl],[main],true,AC_MSG_ERROR([Cannot find libcurl!]))
c6c771a merged + finished gzip support for Walrus transfers, compiled in if zlib...
Dmitrii Zagorodnov authored
187 AC_CHECK_LIB([z],[inflate])
7183c5b from CVS
graziano obertelli authored
188
189 # Checks for header files.
190 AC_HEADER_DIRENT
191 AC_HEADER_STDC
192 AC_HEADER_SYS_WAIT
c6c771a merged + finished gzip support for Walrus transfers, compiled in if zlib...
Dmitrii Zagorodnov authored
193 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
194 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
195 dnl AC_CHECK_HEADER([curl/easy.h],,AC_MSG_ERROR([[Cannot find curl/easy.h]]))
196
197 # Checks for typedefs, structures, and compiler characteristics.
198 AC_C_CONST
199 AC_TYPE_MODE_T
200 AC_TYPE_PID_T
201 AC_TYPE_SIZE_T
202 AC_TYPE_SSIZE_T
203 AC_HEADER_TIME
204 AC_STRUCT_TM
205 AC_TYPE_UINT32_T
206
207 # Checks for functions.
208 AC_FUNC_CLOSEDIR_VOID
209 AC_FUNC_FORK
210 AC_FUNC_LSTAT
211 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
212 AC_FUNC_MALLOC
213 AC_FUNC_MEMCMP
214 AC_FUNC_MKTIME
215 AC_FUNC_MMAP
216 AC_FUNC_REALLOC
217 AC_FUNC_SELECT_ARGTYPES
218 AC_FUNC_STAT
219 AC_FUNC_STRNLEN
220 AC_FUNC_VPRINTF
221 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir])
222
223 # Time to substitute and generate the files
224 AC_CONFIG_FILES([Makedefs
ed1f832 first cut at splitting the init.d scripts per service
graziano obertelli authored
225 tools/eucalyptus-cc:tools/eucalyptus-cc.in
226 tools/eucalyptus-nc:tools/eucalyptus-nc.in
b9ee122 euca_conf now searches the conf file in the installed directory
graziano obertelli authored
227 tools/euca_conf:tools/euca_conf.in
8d720fc We use a master init.d script for the java ws and we generate the script
graziano authored
228 tools/eucalyptus-java-ws:tools/eucalyptus-java-ws.in])
7183c5b from CVS
graziano obertelli authored
229
015eb7c changed VERSION to EUCA_VERSION
graziano authored
230 AC_DEFINE_UNQUOTED(EUCA_VERSION, "$EUCA_VERSION")
7183c5b from CVS
graziano obertelli authored
231
015eb7c changed VERSION to EUCA_VERSION
graziano authored
232 AC_SUBST(EUCA_VERSION)
7183c5b from CVS
graziano obertelli authored
233 AC_SUBST(TOP)
234 AC_SUBST(ANT)
ede1781 WSDL2C.sh is now discovered with autoconf. Fixed dependency in suse (jav...
graziano obertelli authored
235 AC_SUBST(WSDL2C)
7183c5b from CVS
graziano obertelli authored
236 AC_SUBST(JAVA_HOME)
237 AC_SUBST(AXIS2C_HOME)
ebcf56d chris grzegorczyk merge changes to support building .deb packages directly from the reposi...
grze authored
238 AC_SUBST(AXIS2C_SERVICES)
7183c5b from CVS
graziano obertelli authored
239 AC_SUBST(AXIS2_HOME)
240 AC_SUBST(LIBVIRT_HOME)
241 AC_SUBST(CFLAGS)
062f54f Added the large file options (needed on some machines)
graziano obertelli authored
242 AC_SUBST(LDFLAGS)
7183c5b from CVS
graziano obertelli authored
243 AC_SUBST(LIBS)
244 AC_SUBST(INCLUDES)
01f477b Renamed store_tab to extensions. Trying to avoid needless recompilation.
graziano authored
245 AC_SUBST(EXTENSIONS)
9b1361c Added themability at compile time.
graziano authored
246 AC_SUBST(INTERFACE_THEME)
7183c5b from CVS
graziano obertelli authored
247
248
249
250 AC_OUTPUT
Something went wrong with that request. Please try again.