"Fossies" - the Fresh Open Source Software Archive

Member "eucalyptus-4.4.2/configure.ac" (4 Aug 2017, 13008 Bytes) of package /linux/misc/eucalyptus-4.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 4.4.1_vs_4.4.2.

    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 #               [--extra-version=<version>]
   10 #               [--enable-debug]
   11 #               [--db-home=<dir>]
   12 #               [--db-suffix=<version>]
   13 #               [--db-old-home=<dir>]
   14 #               [--db-old-suffix=<version>]
   15 
   16 AC_PREREQ(2.61)
   17 AC_INIT(Eucalyptus,
   18         esyscmd([cat VERSION | tr -d '\n']),
   19         euca-users@eucalyptus.com)
   20 AC_CONFIG_SRCDIR([wsdl/eucalyptus_nc.wsdl])
   21 AC_CONFIG_HEADER([util/eucalyptus-config.h])
   22 AC_PREFIX_DEFAULT([/opt/eucalyptus/])
   23 AC_USE_SYSTEM_EXTENSIONS
   24 AC_CANONICAL_BUILD
   25 
   26 # construct two version strings
   27 EUCA_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d. -f1`
   28 EUCA_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d. -f2`
   29 EUCA_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d. -f3`
   30 EUCA_VERSION_HOTFIX=`echo $PACKAGE_VERSION | cut -d. -f4`
   31 EUCA_VERSION="${EUCA_VERSION_MAJOR}.${EUCA_VERSION_MINOR}.${EUCA_VERSION_PATCH}"
   32 EUCA_VERSION_FULL="$PACKAGE_VERSION"
   33 
   34 # let's figure out where is the source tree
   35 if test ${srcdir} = "." ; then
   36         TOP=`pwd`
   37 else
   38         TOP=${srcdir}
   39 fi
   40 
   41 # variables we'll need later on
   42 APACHE2_MODULE_DIR=""
   43 AXIS2C_HOME="${AXIS2C_HOME}"
   44 AXIS2_HOME="${AXIS2_HOME}"
   45 AXIS2C_SERVICES=""
   46 LIBVIRT_HOME="${LIBVIRT_HOME}"
   47 ANT=""
   48 JAVA=""
   49 WSDL2C=""
   50 java_min_version="1.8.0"
   51 ant_min_version="1.6.5"
   52 
   53 # these are for large files (>2GB)
   54 LDFLAGS="`getconf LFS64_LDFLAGS` `getconf LFS_LDFLAGS` $LDFLAGS"
   55 LIBS="`getconf LFS64_LIBS` `getconf LFS_LIBS` $LIBS"
   56 CFLAGS="${CFLAGS} `getconf LFS64_CFLAGS` `getconf LFS_CFLAGS`"
   57 
   58 # compile options
   59 CFLAGS="${CFLAGS} -Wall -fPIC -DHAVE_CONFIG_H -std=gnu99"
   60 INCLUDES="${INCLUDES} -I. -I.. -Igenerated -I${TOP}/storage -I${TOP}/node -I${TOP}/util -I${TOP}/net -I${TOP}/util/stats"
   61 
   62 # Arguments checking
   63 AC_ARG_ENABLE(bundled-jars,
   64         AS_HELP_STRING([--disable-bundled-jars] [do not build against or install bundled jars]),
   65         [USE_BUNDLED_JARS=$enableval],
   66         [USE_BUNDLED_JARS=yes])
   67 AC_ARG_WITH(apache2-module-dir,
   68         [  --with-apache2-module-dir=<dir>      where Apache modules are installed],
   69         [APACHE2_MODULE_DIR="${withval}"])
   70 AC_ARG_WITH(axis2,
   71         [  --with-axis2=<dir>                   where axis2 is installed],
   72         [AXIS2_HOME="${withval}"])
   73 AC_ARG_WITH(axis2c,
   74         [  --with-axis2c=<dir>                  where axis2c is installed],
   75         [AXIS2C_HOME="${withval}"])
   76 AC_ARG_WITH(axis2c-services,
   77         [  --with-axis2c-services=<dir>         where axis2c services are installed],
   78         [AXIS2C_SERVICES="${withval}"])
   79 AC_ARG_WITH(libvirt,
   80         [  --with-libvirt=<dir>                 where libvirt is installed],
   81         [LIBVIRT_HOME="${withval}"])
   82 AC_ARG_WITH(wsdl2c-sh,
   83         [  --with-wsdl2c-sh=<file>              where WSDL2C.sh is installed],
   84         [WSDL2C="${withval}"])
   85 AC_ARG_WITH(db-home,
   86         [  --with-db-home=<dir>                 where postgresql is installed],
   87         [EUCA_DB_HOME="${withval}"])
   88 AC_ARG_WITH(db-suffix,
   89         [  --with-db-suffix=<dir>               where postgresql is installed],
   90         [EUCA_DB_SUFFIX="${withval}"])
   91 AC_ARG_WITH(db-old-home,
   92         [  --with-db-old-home=<dir>             where previous postgresql is installed],
   93         [EUCA_DB_OLD_HOME="${withval}"])
   94 AC_ARG_WITH(db-old-suffix,
   95         [  --with-db-old-suffix=<dir>           where previous postgresql is installed],
   96         [EUCA_DB_OLD_SUFFIX="${withval}"])
   97 AC_ARG_ENABLE(debug,
   98         [  --enable-debug                       include debugging info when compiling],
   99         [if test "${enableval}" != "no"; then
  100                 DEBUGGING_ENABLED=yes
  101                 CFLAGS="$CFLAGS -g -DDEBUG"
  102         fi])
  103 AC_ARG_WITH(extra-version,
  104         [  --extra-version=<str>                string to append to versions to make logs and messages more precise],
  105         [EXTRA_VERSION="${withval}"])
  106 AC_ARG_WITH(java-home,
  107         [  --with-java-home=<dir>               where the JRE is installed (same as JAVA_HOME)],
  108         [JAVA_HOME="${withval}"])
  109 
  110 # If we didn't specify the services directory, let's use the default
  111 if test -z "$AXIS2C_SERVICES" ; then
  112         AXIS2C_SERVICES="${AXIS2C_HOME}/services"
  113 fi
  114 
  115 # If we didn't specify the location of Apache modules, assume mod_axis2
  116 # resides within AXIS2C_HOME
  117 if test -z "$APACHE2_MODULE_DIR"; then
  118         APACHE2_MODULE_DIR="${AXIS2C_HOME}/lib"
  119 fi
  120 
  121 AM_PATH_PYTHON([2.5])
  122 AC_MSG_CHECKING([whether $PYTHON version is < 3.0])
  123 AM_PYTHON_CHECK_VERSION([$PYTHON], [3.0],
  124                         [AC_MSG_RESULT([no])
  125                          AC_MSG_ERROR([Python >= 3.0 is not supported])],
  126                         [AC_MSG_RESULT([yes])])
  127 
  128 # Fix the paths for includes and libraries
  129 if test -n "${AXIS2C_HOME}" ; then
  130         if test -d "${AXIS2C_HOME}"/include ; then
  131                 for x in ${AXIS2C_HOME}/include/axis2-* ${AXIS2C_HOME}/include/rampart-*; do
  132                         INCLUDES="${INCLUDES} -I$x"
  133                 done
  134         else
  135                 for x in /usr/include/axis2-* /usr/include/rampart-*; do
  136                         INCLUDES="${INCLUDES} -I$x"
  137                 done
  138         fi
  139         if test -d "${AXIS2C_HOME}"/lib ; then
  140                 LDFLAGS="-L${AXIS2C_HOME}/lib ${LDFLAGS}"
  141         fi
  142         if test -d "${AXIS2C_HOME}"/modules/rampart ; then
  143                 LDFLAGS="-L${AXIS2C_HOME}/modules/rampart ${LDFLAGS}"
  144         fi
  145 fi
  146 if test -n "${LIBVIRT_HOME}" ; then
  147         if test -d "${LIBVIRT_HOME}"/include ; then
  148                 INCLUDES="${INCLUDES} -I${LIBVIRT_HOME}/include"
  149                 LDFLAGS="-L${LIBVIRT_HOME}/lib ${LDFLAGS}"
  150         fi
  151 fi
  152 
  153 # Checks for programs.
  154 AC_PROG_AWK
  155 AC_PROG_CC
  156 AC_PROG_INSTALL
  157 AC_PROG_MAKE_SET
  158 AC_PATH_PROG(RM, rm)
  159 AC_LANG_C
  160 
  161 if test -z "$WSDL2C"; then
  162         WSDL2C=`readlink -f devel/euca-WSDL2C.sh`
  163 fi
  164 
  165 # we need JAVA_HOME
  166 if test -z "$JAVA_HOME" ; then
  167         AC_PATH_PROG([JAVAC], javac,, $PATH)
  168         if test -z "$JAVAC" ; then
  169                 AC_MSG_ERROR([JAVA_HOME is not defined and javac was not found in PATH])
  170         else
  171                 JAVA_HOME=$( readlink -f ${JAVAC} | rev | cut -d/ -f3- | rev )
  172         fi
  173 fi
  174 
  175 AC_PATH_PROGS([ANT], ant17 ant,,$ANT_HOME/bin:$PATH)
  176 AC_PATH_PROG([JAVA], java,,$JAVA_HOME/bin)
  177 
  178 # Check the version of java and ant
  179 if test -z "$ANT" ; then
  180         AC_MSG_ERROR([Cannot find ant!])
  181 fi
  182 if test -z "$JAVA" ; then
  183         AC_MSG_ERROR([Cannot find java!])
  184 fi
  185 java_version=`$JAVA -version 2>&1 | head -n 1 | awk -F '"' '{print $2}'`
  186 goodversion=`expr $java_version ">=" $java_min_version`
  187 if test $goodversion -eq 0; then
  188         AC_MSG_ERROR([Eucalyptus needs at least JDK version $java_min_version])
  189 fi
  190 
  191 # now let's test we have jni.h
  192 if test ! -e $JAVA_HOME/include/jni.h ; then
  193         AC_MSG_ERROR([Cannot find jni.h in $JAVA_HOME: do you have a JDK installed?])
  194 fi
  195 
  196 ant_version=`$ANT -version 2>&1 | grep "Ant.* version" | \
  197         sed -e 's/.*Ant.* version \([[0-9.]]*\).*/\1/'`
  198 goodversion=`expr $ant_version ">=" $ant_min_version`
  199 if test $goodversion -eq 0; then
  200         AC_MSG_ERROR([Eucalyptus needs at least ANT version $ant_min_version])
  201 fi
  202 # some version of ant picks up the wrong java
  203 java_version=`JAVA_HOME=$JAVA_HOME $ANT -diagnostics 2>&1 | grep ^java.version | \
  204         sed -e 's/java.* \([[0-9.]]*\).*/\1/'`
  205 goodversion=`expr $java_version ">=" $java_min_version`
  206 if test $goodversion -eq 0; then
  207         AC_MSG_ERROR([ANT is using the wrong java (version less than $java_min_version)])
  208 fi
  209 
  210 
  211 # Checks for libraries.
  212 AC_CHECK_LIB([axis2_axiom],[axiom_node_get_parent],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  213 AC_CHECK_LIB([axis2_engine],[axis2_msg_ctx_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  214 AC_CHECK_LIB([axis2_http_common],[axis2_simple_http_svr_conn_get_peer_ip],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  215 AC_CHECK_LIB([axis2_http_receiver],[axis2_http_server_create],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  216 AC_CHECK_LIB([axis2_http_sender],[axis2_http_transport_sender_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  217 AC_CHECK_LIB([guththila],[guththila_create_xml_stream_writer],,AC_MSG_ERROR([Cannot find libguththila!]))
  218 AC_CHECK_LIB([axis2_parser],[axiom_xml_reader_init],,AC_MSG_ERROR([Cannot find axis2 libs!]))
  219 AC_CHECK_LIB([axutil],[axutil_url_get_path],,AC_MSG_ERROR([Cannot find libaxutil]))
  220 AC_CHECK_LIB([m],[log10])
  221 AC_CHECK_LIB([mod_rampart],[rampart_mod_create],,AC_MSG_ERROR([Cannot find libmod_rampart]))
  222 AC_CHECK_LIB([neethi],[neethi_engine_get_policy],,AC_MSG_ERROR([Cannot find libneethi!]))
  223 AC_CHECK_LIB([pthread],[pthread_join],,AC_MSG_ERROR([Cannot find pthreads!]))
  224 AC_CHECK_LIB([rt],[timer_gettime])
  225 AC_CHECK_LIB([virt],[virStorageVolDownload],true,AC_MSG_ERROR([Cannot find libvirt!]))
  226 AC_CHECK_LIB([curl],[curl_version_info],true,AC_MSG_ERROR([Cannot find libcurl!]))
  227 AC_CHECK_LIB([z],[inflate])
  228 AC_CHECK_LIB([cap],[cap_from_name],,AC_MSG_WARN([Cannot find sufficiently recent libcap will not use it]))
  229 AC_CHECK_LIB([xml2],[xmlFree],,AC_MSG_ERROR([Cannot find libxml2!]))
  230 
  231 # Checks for header files.
  232 AC_HEADER_DIRENT
  233 AC_HEADER_STDC
  234 AC_HEADER_SYS_WAIT
  235 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])
  236 AC_CHECK_HEADER([curl/curl.h],,AC_MSG_ERROR([[Cannot find curl/curl.h]]))
  237 
  238 # Checks for typedefs, structures, and compiler characteristics.
  239 AC_C_CONST
  240 AC_TYPE_MODE_T
  241 AC_TYPE_PID_T
  242 AC_TYPE_SIZE_T
  243 AC_TYPE_SSIZE_T
  244 AC_HEADER_TIME
  245 AC_STRUCT_TM
  246 AC_TYPE_UINT32_T
  247 
  248 # Checks for functions.
  249 AC_FUNC_CLOSEDIR_VOID
  250 AC_FUNC_FORK
  251 AC_FUNC_LSTAT
  252 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
  253 AC_FUNC_MALLOC
  254 AC_FUNC_MEMCMP
  255 AC_FUNC_MKTIME
  256 AC_FUNC_MMAP
  257 AC_FUNC_REALLOC
  258 AC_FUNC_SELECT_ARGTYPES
  259 AC_FUNC_STAT
  260 AC_FUNC_STRNLEN
  261 AC_FUNC_VPRINTF
  262 AC_CHECK_FUNCS([bzero dup2 ftruncate gettimeofday mkdir pow select strchr strdup strerror strncasecmp strstr rmdir xmlFirstElementChild])
  263 
  264 # Time to substitute and generate the files
  265 AC_CONFIG_FILES([Makedefs
  266                  admin-tools/eucalyptus_admin/__init__.py:admin-tools/eucalyptus_admin/__init__.py.in
  267                  clc/modules/postgresql/src/main/resources/postgresql-binaries.properties:clc/modules/postgresql/src/main/resources/postgresql-binaries.properties.in
  268                  clc/eucadmin/setup.cfg.template:clc/eucadmin/setup.cfg.template.in
  269                  clc/eucadmin/eucadmin/__init__.py:clc/eucadmin/eucadmin/__init__.py.in
  270                  clc/modules/bootstrap/src/main/native/arguments.ggo:clc/modules/bootstrap/src/main/native/arguments.ggo.in
  271                  cluster/eucalyptus-cluster
  272                  node/eucalyptus-node
  273                  tools/eucalyptus-logrotate.conf:tools/eucalyptus-logrotate.conf.in
  274                  tools/imaging/setup.cfg.template:tools/imaging/setup.cfg.template.in
  275                  tools/imaging/eucatoolkit/__init__.py:tools/imaging/eucatoolkit/__init__.py.in
  276                  clc/modules/bootstrap/src/main/resources/version.properties:clc/modules/bootstrap/src/main/resources/version.properties.in])
  277 
  278 AC_DEFINE_UNQUOTED([EUCA_VERSION], "$EUCA_VERSION", [Version of Eucalyptus])
  279 
  280 AC_SUBST(ANT)
  281 AC_SUBST(APACHE2_MODULE_DIR)
  282 AC_SUBST(AXIS2C_HOME)
  283 AC_SUBST(AXIS2C_SERVICES)
  284 AC_SUBST(AXIS2_HOME)
  285 AC_SUBST(CFLAGS)
  286 AC_SUBST(EUCA_DB_HOME)
  287 AC_SUBST(EUCA_DB_SUFFIX)
  288 AC_SUBST(EUCA_DB_OLD_HOME)
  289 AC_SUBST(EUCA_DB_OLD_SUFFIX)
  290 AC_SUBST(EUCA_VERSION)
  291 AC_SUBST(EUCA_VERSION_FULL)
  292 AC_SUBST(EXTRA_VERSION)
  293 AC_SUBST(INCLUDES)
  294 AC_SUBST(INTERFACE_THEME)
  295 AC_SUBST(JAVA_HOME)
  296 AC_SUBST(LDFLAGS)
  297 AC_SUBST(LIBS)
  298 AC_SUBST(LIBVIRT_HOME)
  299 AC_SUBST(PYTHON)
  300 AC_SUBST(RM)
  301 AC_SUBST(TOP)
  302 AC_SUBST(USE_BUNDLED_JARS)
  303 AC_SUBST(WSDL2C)
  304 
  305 
  306 AC_OUTPUT
  307 
  308 dnl Configuration output
  309 
  310 echo ""
  311 echo "  Eucalyptus ${EUCA_VERSION} (${EUCA_VERSION_FULL})"
  312 echo ""
  313 echo "  Flags and Settings:"
  314 echo "    CFLAGS..............: ${CFLAGS}"
  315 echo "    LDFLAGS.............: ${LDFLAGS}"
  316 echo "    LIBS................: ${LIBS}"
  317 echo "    Debugging Enabled...: ${DEBUGGING_ENABLED:-no}"
  318 echo "    Use bundled jars....: ${USE_BUNDLED_JARS}"
  319 echo ""
  320 echo "  Build Tools:"
  321 echo "    ANT.................: ${ANT} (${ant_version})"
  322 echo "    JAVA................: ${JAVA} (${java_version})"
  323 echo "    PYTHON..............: ${PYTHON} (${PYTHON_VERSION})"
  324 echo "    WSDL2C..............: ${WSDL2C}"
  325 echo ""
  326 echo "  Locations:"
  327 echo "    PREFIX..............: ${prefix:-Not Set}"
  328 echo "    APACHE2_MODULE_DIR..: ${APACHE2_MODULE_DIR:-Not Set}"
  329 echo "    AXIS2C_HOME.........: ${AXIS2C_HOME:-Not Set}"
  330 echo "    AXIS2C_SERVICES.....: ${AXIS2C_SERVICES:-Not Set}"
  331 echo "    AXIS2_HOME..........: ${AXIS2_HOME:-Not Set}"
  332 echo "    EUCA_DB_HOME........: ${EUCA_DB_HOME:-Not Set}"
  333 echo "    EUCA_DB_SUFFIX......: ${EUCA_DB_SUFFIX:-Not Set}"
  334 echo "    EUCA_DB_OLD_HOME....: ${EUCA_DB_OLD_HOME:-Not Set}"
  335 echo "    EUCA_DB_OLD_SUFFIX..: ${EUCA_DB_OLD_SUFFIX:-Not Set}"
  336 echo "    JAVA_HOME...........: ${JAVA_HOME:-Not Set}"
  337 echo "    LIBVIRT_HOME........: ${LIBVIRT_HOME:-Not Set}"
  338 echo ""
  339