Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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