dnl dnl dnl ProLinga-Run dnl dnl Copyright (C) 2002-2008 Xobas Software. dnl All rights reserved. dnl dnl This file is part of ProLinga-Run. dnl dnl ProLinga-Run is free software: you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation, either version 3 of the License, or dnl (at your option) any later version. dnl dnl ProLinga-Run is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with ProLinga-Run. If not, see . dnl dnl More information is available at the following addresses: dnl dnl Website : http://www.prolinga.org dnl dnl Email : prolinga-list@prolinga.org dnl dnl dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(ProLinga-Run,0.0.1,prolinga-list@prolinga.org,prolinga-run) AC_CONFIG_SRCDIR(src/RunStart.cpp) AC_CONFIG_AUX_DIR(config) dnl Check for CPU / Vendor / OS AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET AC_LANG(C++) AM_CONFIG_HEADER(src/config.h:src/config-h.in) AM_INIT_AUTOMAKE dnl set host/node name HOST_NODE_NAME=`(hostname || uname -n) 2>/dev/null | sed 1q` AC_SUBST(HOST_NODE_NAME) dnl set home dir HOME_DIR=`echo $HOME` AC_SUBST(HOME_DIR) dnl set required 3rd party versions PKG_CONFIG_REQUIRED_VERSION=0.7.0 LIBXML_REQUIRED_VERSION=2.6.5 LIBXSLT_REQUIRED_VERSION=1.0.33 GTK_REQUIRED_VERSION=2.4.0 LIBGLADE_PACKAGE="libglade-2.0" LIBGLADE_REQUIRED_VERSION=2.3.6 PROLINGASOAP_PACKAGE="prolinga-soap" PROLINGASOAP_REQUIRED_VERSION=0.0.1 PROLINGACALC_PACKAGE="prolinga-calc" PROLINGACALC_REQUIRED_VERSION=0.0.1 dnl set optional 3rd party versions ENABLE_LOCAL_DATA="no" ENABLE_LOCAL_REPOSITORY="no" ENABLE_LOCAL_VALIDATE="no" DISABLE_SOAP="no" PROLINGADATA_PACKAGE="prolinga-data" PROLINGADATA_REQUIRED_VERSION=0.0.1 PROLINGADATA_CONFIG_FILE_NAME=prolingadatcfg.xml PROLINGAREPOSITORY_PACKAGE="prolinga-repository" PROLINGAREPOSITORY_REQUIRED_VERSION=0.0.1 PROLINGAREPOSITORY_CONFIG_FILE_NAME=prolingarepcfg.xml PROLINGAVALIDATE_PACKAGE="prolinga-validate_nonet" PROLINGAVALIDATE_REQUIRED_VERSION=0.0.1 PROLINGAVALIDATE_CONFIG_FILE_NAME=prolingavalcfg.xml dnl Set default pkg search path PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" dnl Enable debugging mode AC_ARG_ENABLE(debug, [ --enable-debug Enable debug messages], CFLAGS="$CFLAGS -DDEBUG -O0 -g" CXXFLAGS="$CFLAGS -DDEBUG -O0 -g") AC_ARG_ENABLE(gprof, [ --enable-gprof Enable profiling with gprof], CFLAGS="$CFLAGS -pg" CXXFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -pg" ) dnl Enable stripped and optimized release builds AC_ARG_ENABLE(final, [ --enable-final Build release executables (GCC only)], if test "x$GCC" != xyes; then CFLAGS="$CFLAGS -DNDEBUG -Os -s -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS" CXXFLAGS="$CXXFLAGS -DNDEBUG -Os -s -fno-exceptions -fno-check-new -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS" fi) dnl Enable compiler warnings AC_ARG_ENABLE(warnings, [ --enable-warnings Enable compiler warnings (GCC only)], if test "x$GCC" != xyes; then CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wmissing-declarations -Wparentheses -Wpointer-arith" CXXFLAGS="$CXXFLAGS -Wall -Wparentheses -Wpointer-arith" fi) dnl Enable local data AC_ARG_ENABLE(local-data, [ --enable-local-data Enable local data by linking with prolinga-data], ENABLE_LOCAL_DATA="yes") dnl Enable local repository AC_ARG_ENABLE(local-repository, [ --enable-local-repository Enable local repository by linking with prolinga-repository], ENABLE_LOCAL_REPOSITORY="yes") dnl Enable local validate AC_ARG_ENABLE(local-validate, [ --enable-local-validate Enable local validate by linking with prolinga-validate], ENABLE_LOCAL_VALIDATE="yes") dnl Disable soap dnl AC_ARG_ENABLE(soap, dnl [ --disable-soap Disable SOAP and Web Services], dnl DISABLE_SOAP="yes") dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_PROG_INSTALL #AC_PROG_RANLIB dnl cygwin dlls do not accept undefined links case "$host_os" in *cygwin) LDFLAGS="-no-undefined $LDFLAGS" AC_LIBTOOL_WIN32_DLL ;; esac AC_PROG_LIBTOOL dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(ctype.h fcntl.h signal.h stddef.h time.h) dnl Checks for typedefs, structures and compiler characteristics. AC_C_CONST AC_CHECK_TYPES(bool) AC_HEADER_STDBOOL AC_STRUCT_TM AC_TYPE_PID_T AC_TYPE_SIGNAL #AC_TYPE_SIZE_T dnl Checks for library functions. AC_FUNC_FORK AC_FUNC_STRTOD AC_CHECK_FUNCS(strcspn strstr) dnl Check 3rd party products dnl dnl If pkg-config available use it, otherwise ignore dnl Not sure how widely accepted/available pkg-config is dnl AC_PATH_PROG(PKG_CONFIG, pkg-config, no) dnl test if pkg-config is available and if so if correct version if test "x$PKG_CONFIG" = "xno" then AC_MSG_NOTICE([Could not find pkg-config anywhere (optional). It is recommended to have pkg-config available for library compile/link flag detections during configure. Check http://www.freedesktop.org/software/pkgconfig/ for details.]) else AC_MSG_CHECKING(for pkg-config >= $PKG_CONFIG_REQUIRED_VERSION) if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_REQUIRED_VERSION then AC_MSG_RESULT(yes) else PKG_CONFIG_VERS=`$PKG_CONFIG --version` AC_MSG_RESULT(Version $PKG_CONFIG_VERS found. You need at least pkg-config $PKG_CONFIG_REQUIRED_VERSION for this version of ProLinga-Web) PKG_CONFIG="no" fi fi dnl dnl specify location of libxml2 dnl LIBXML_CONFIG_PREFIX="" LIBXML_CXXFLAGS="" LIBXML_LIBS="" AC_ARG_WITH(libxml-prefix, [ --with-libxml-prefix=[PFX] Specify location of libxml config], LIBXML_CONFIG_PREFIX=$withval ) AC_ARG_WITH(libxml-include-prefix, [ --with-libxml-include-prefix=[PFX] Specify location of libxml headers], LIBXML_CXXFLAGS="-I$withval" ) AC_ARG_WITH(libxml-libs-prefix, [ --with-libxml-libs-prefix=[PFX] Specify location of libxml libs], LIBXML_LIBS="-L$withval" ) dnl where is xml2-config AC_SUBST(LIBXML_REQUIRED_VERSION) AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION) if test "x$LIBXML_CONFIG_PREFIX" != "x" then XML_CONFIG=${LIBXML_CONFIG_PREFIX}/bin/xml2-config else XML_CONFIG=xml2-config fi dnl check version number AC_DEFUN([VERSION_TO_NUMBER], [`$1 | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`]) if ${XML_CONFIG} --libs print > /dev/null 2>&1 then XMLVERS=`$XML_CONFIG --version` if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION) then PKG_CONFIG_PATH="`$XML_CONFIG --prefix`/lib/pkgconfig:$PKG_CONFIG_PATH" LIBXML_LIBS="$LIBXML_LIBS `$XML_CONFIG --libs`" LIBXML_CXXFLAGS="$LIBXML_CXXFLAGS `$XML_CONFIG --cflags`" AC_MSG_RESULT($XMLVERS found) else AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of ProLinga-Run) fi else AC_MSG_ERROR([Could not find libxml2 anywhere, check http://xmlsoft.org/.]) fi AC_SUBST(XML_CONFIG) AC_SUBST(LIBXML_LIBS) AC_SUBST(LIBXML_CXXFLAGS) dnl dnl specify location of libxslt dnl LIBXSLT_CONFIG_PREFIX="" LIBXSLT_CFLAGS="" LIBXSLT_LIBS="" AC_ARG_WITH(libxslt-prefix, [ --with-libxslt-prefix=[PFX] Specify location of libxslt config], LIBXSLT_CONFIG_PREFIX=$withval ) AC_ARG_WITH(libxslt-include-prefix, [ --with-libxslt-include-prefix=[PFX] Specify location of libxslt headers], LIBXSLT_CFLAGS="-I$withval" ) AC_ARG_WITH(libxslt-libs-prefix, [ --with-libxslt-libs-prefix=[PFX] Specify location of libxslt libs], LIBXSLT_LIBS="-L$withval" ) dnl where is xslt-config AC_SUBST(LIBXSLT_REQUIRED_VERSION) AC_MSG_CHECKING(for libxslt libraries >= $LIBXSLT_REQUIRED_VERSION) if test "x$LIBXSLT_CONFIG_PREFIX" != "x" then XSLT_CONFIG=${LIBXSLT_CONFIG_PREFIX}/bin/xslt-config else XSLT_CONFIG=xslt-config fi dnl check version number AC_DEFUN([VERSION_TO_NUMBER], [`$1 | sed -e 's/libxslt //' | awk 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 1000 + [$]2) * 1000 + [$]3;}'`]) if ${XSLT_CONFIG} --libs print > /dev/null 2>&1 then XSLTVERS=`$XSLT_CONFIG --version` if test VERSION_TO_NUMBER(echo $XSLTVERS) -ge VERSION_TO_NUMBER(echo $LIBXSLT_REQUIRED_VERSION) then LIBXSLT_LIBS="$LIBXSLT_LIBS `$XSLT_CONFIG --libs`" LIBXSLT_CFLAGS="$LIBXSLT_CFLAGS `$XSLT_CONFIG --cflags`" AC_MSG_RESULT($XSLTVERS found) else AC_MSG_ERROR(Version $XSLTVERS found. You need at least libxslt $LIBXSLT_REQUIRED_VERSION for this version of ProLinga-Run) fi else AC_MSG_ERROR([Could not find libxslt anywhere, check http://xmlsoft.org/.]) fi AC_SUBST(XSLT_CONFIG) AC_SUBST(LIBXSLT_LIBS) AC_SUBST(LIBXSLT_CFLAGS) dnl dnl specify location of GTK dnl GTK_PREFIX="" GTK_CXXFLAGS="" GTK_LIBS="" AC_ARG_WITH(gtk-prefix, [ --with-gtk-prefix=[PFX] Specify location of GTK+], GTK_PREFIX=$withval ) AC_ARG_WITH(gtk-include-prefix, [ --with-gtk-include-prefix=[PFX] Specify location of GTK+ headers], GTK_CXXFLAGS="-I$withval" ) AC_ARG_WITH(gtk-libs-prefix, [ --with-gtk-libs-prefix=[PFX] Specify location of GTK+ libs], GTK_LIBS="-L$withval" ) if test $GTK_PREFIX then PKG_CONFIG_PATH="$GTK_PREFIX:$PKG_CONFIG_PATH" fi if test $GTK_LIBS then PKG_CONFIG_PATH="`echo $GTK_LIBS | sed -e 's/-L//'`:$PKG_CONFIG_PATH" fi AC_MSG_CHECKING(for GTK+ libraries >= $GTK_REQUIRED_VERSION) PKG_CONFIG=pkg-config if `$PKG_CONFIG --atleast-version $GTK_REQUIRED_VERSION gtk+-2.0` then AC_MSG_RESULT(found) else AC_MSG_ERROR(You need at least GTK+ $GTK_REQUIRED_VERSION for this version of ProLinga-Run) fi GTK_CXXFLAGS="$GTK_CXXFLAGS `$PKG_CONFIG --cflags gtk+-2.0`" GTK_LIBS="$GTK_LIBS `$PKG_CONFIG --libs gtk+-2.0`" AC_SUBST(GTK_CXXFLAGS) AC_SUBST(GTK_LIBS) dnl dnl specify location of Libglade-2.0 dnl LIBGLADE_PREFIX="" LIBGLADE_CXXFLAGS="" LIBGLADE_LIBS="" AC_ARG_WITH(libglade-prefix, [ --with-libglade-prefix=[PFX] Specify location of Libglade-2.0], LIBGLADE_PREFIX=$withval ) AC_ARG_WITH(libglade-include-prefix, [ --with-libglade-include-prefix=[PFX] Specify location of Libglade-2.0 headers], LIBGLADE_CXXFLAGS="-I$withval" ) AC_ARG_WITH(libglade-libs-prefix, [ --with-libglade-libs-prefix=[PFX] Specify location of Libglade-2.0 libs], LIBGLADE_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for Libglade-2.0 libraries >= $LIBGLADE_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" if test $LIBGLADE_PREFIX then PKG_CONFIG_SEARCH="$LIBGLADE_PREFIX/lib64/pkgconfig:$LIBGLADE_PREFIX/lib/pkgconfig:$PKG_CONFIG_SEARCH" fi if test $LIBGLADE_LIBS then SEARCH_LIB=`echo $LIBGLADE_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $LIBGLADE_PACKAGE >/dev/null 2>&1` then LIBGLADEVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $LIBGLADE_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$LIBGLADE_REQUIRED_VERSION $LIBGLADE_PACKAGE` then LIBGLADE_CXXFLAGS="$LIBGLADE_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $LIBGLADE_PACKAGE`" LIBGLADE_LIBS="$LIBGLADE_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs $LIBGLADE_PACKAGE`" AC_MSG_RESULT($LIBGLADEVERS found) else AC_MSG_ERROR(Version $LIBGLADEVERS found. You need at least Libglade-2.0 $LIBGLADE_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $LIBGLADE_PACKAGE` AC_MSG_ERROR([Could not find Libglade-2.0 or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.daa.com.au/~james/software/libglade/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for Libglade-2.0 libraries ) if test -f `echo $LIBGLADE_LIBS | sed -e 's/-L//'`/libglade-2.0.la || test -f $LIBGLADE_PREFIX/lib/libglade-2.0.la \ || test -f /usr/lib64/libglade-2.0.la || test -f /usr/local/lib64/libglade-2.0.la \ || test -f /usr/lib/libglade-2.0.la || test -f /usr/local/lib/libglade-2.0.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find Libglade-2.0 anywhere, check http://www.daa.com.au/~james/software/libglade/.]) fi if test $LIBGLADE_PREFIX then LIBGLADE_CXXFLAGS="$LIBGLADE_CXXFLAGS -I$LIBGLADE_PREFIX/include/libglade-2.0" LIBGLADE_LIBS="$LIBGLADE_LIBS -L$LIBGLADE_PREFIX/lib" fi fi dnl export values AC_SUBST(LIBGLADE_LIBS) AC_SUBST(LIBGLADE_CXXFLAGS) dnl dnl specify location of ProLinga-Calc dnl PROLINGACALC_PREFIX="" PROLINGACALC_CXXFLAGS="" PROLINGACALC_LIBS="" AC_ARG_WITH(prolingacalc-prefix, [ --with-prolingacalc-prefix=[PFX] Specify location of ProLinga-Calc], PROLINGACALC_PREFIX=$withval ) AC_ARG_WITH(prolingacalc-include-prefix, [ --with-prolingacalc-include-prefix=[PFX] Specify location of ProLinga-Calc headers], PROLINGACALC_CXXFLAGS="-I$withval" ) AC_ARG_WITH(prolingacalc-libs-prefix, [ --with-prolingacalc-libs-prefix=[PFX] Specify location of ProLinga-Calc libs], PROLINGACALC_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for ProLinga-Calc libraries >= $PROLINGACALC_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="" if test $PROLINGACALC_PREFIX then PKG_CONFIG_SEARCH="$PROLINGACALC_PREFIX/lib/pkgconfig" fi if test $PROLINGACALC_LIBS then SEARCH_LIB=`echo $PROLINGACALC_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGACALC_PACKAGE >/dev/null 2>&1` then CALCVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGACALC_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$PROLINGACALC_REQUIRED_VERSION $PROLINGACALC_PACKAGE` then PROLINGACALC_CXXFLAGS="$PROLINGACALC_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $PROLINGACALC_PACKAGE`" PROLINGACALC_LIBS="$PROLINGACALC_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs $PROLINGACALC_PACKAGE`" AC_MSG_RESULT($CALCVERS found) else AC_MSG_ERROR(Version $CALCVERS found. You need at least ProLinga-Calc $PROLINGACALC_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGACALC_PACKAGE` AC_MSG_ERROR([Could not find ProLinga-Calc or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.prolinga.org/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for ProLinga-Calc libraries ) if test -f `echo $PROLINGACALC_LIBS | sed -e 's/-L//'`/libprolingacalc.la || test -f $PROLINGACALC_PREFIX/lib/libprolingacalc.la \ || test -f /usr/lib64/libprolingacalc.la || test -f /usr/local/lib64/libprolingacalc.la \ || test -f /usr/lib/libprolingacalc.la || test -f /usr/local/lib/libprolingacalc.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find ProLinga-Calc anywhere, check http://www.prolinga.org/.]) fi if test $PROLINGACALC_PREFIX then PROLINGACALC_CXXFLAGS="$PROLINGACALC_CXXFLAGS -I$PROLINGACALC_PREFIX/include" PROLINGACALC_LIBS="$PROLINGACALC_LIBS -L$PROLINGACALC_PREFIX/lib -lprolingacalc -lm" fi fi dnl export values AC_SUBST(PROLINGACALC_LIBS) AC_SUBST(PROLINGACALC_CXXFLAGS) dnl dnl specify location of ProLinga-Soap dnl PROLINGASOAP_PREFIX="" PROLINGASOAP_CXXFLAGS="" PROLINGASOAP_LIBS="" if test "x$DISABLE_SOAP" != xyes then AC_ARG_WITH(prolingasoap-prefix, [ --with-prolingasoap-prefix=[PFX] Specify location of ProLinga-Soap], PROLINGASOAP_PREFIX=$withval ) AC_ARG_WITH(prolingasoap-include-prefix, [ --with-prolingasoap-include-prefix=[PFX] Specify location of ProLinga-Soap headers], PROLINGASOAP_CXXFLAGS="-I$withval" ) AC_ARG_WITH(prolingasoap-libs-prefix, [ --with-prolingasoap-libs-prefix=[PFX] Specify location of ProLinga-Soap libs], PROLINGASOAP_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for ProLinga-Soap libraries >= $PROLINGASOAP_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" if test $PROLINGASOAP_PREFIX then PKG_CONFIG_SEARCH="$PROLINGASOAP_PREFIX/lib64/pkgconfig:$PROLINGASOAP_PREFIX/lib/pkgconfig:$PKG_CONFIG_SEARCH" fi if test $PROLINGASOAP_LIBS then SEARCH_LIB=`echo $PROLINGASOAP_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGASOAP_PACKAGE >/dev/null 2>&1` then SOAPVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGASOAP_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$PROLINGASOAP_REQUIRED_VERSION $PROLINGASOAP_PACKAGE` then PROLINGASOAP_CXXFLAGS="$PROLINGASOAP_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $PROLINGASOAP_PACKAGE`" PROLINGASOAP_LIBS="$PROLINGASOAP_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs-only-L $PROLINGASOAP_PACKAGE`" AC_MSG_RESULT($SOAPVERS found) else AC_MSG_ERROR(Version $SOAPVERS found. You need at least ProLinga-Soap $PROLINGASOAP_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGASOAP_PACKAGE` AC_MSG_ERROR([Could not find ProLinga-Soap or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.prolinga.org/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for ProLinga-Soap libraries ) if test -f `echo $PROLINGASOAP_LIBS | sed -e 's/-L//'`/libprolingasoapclient.la || test -f $PROLINGASOAP_PREFIX/lib/libprolingasoapclient.la \ || test -f /usr/lib64/libprolingasoapclient.la || test -f /usr/local/lib64/libprolingasoapclient.la \ || test -f /usr/lib/libprolingasoapclient.la || test -f /usr/local/lib/libprolingasoapclient.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find ProLinga-Soap anywhere, check http://www.prolinga.org/.]) fi if test $PROLINGASOAP_PREFIX then PROLINGASOAP_CXXFLAGS="$PROLINGASOAP_CXXFLAGS -I$PROLINGASOAP_PREFIX/include" PROLINGASOAP_LIBS="$PROLINGASOAP_LIBS -L$PROLINGASOAP_PREFIX/lib" fi fi DEFINE_NOBUILD_SOAP="-DNOBUILD_SOAP" AC_SUBST(DEFINE_NOBUILD_SOAP) fi dnl export values AC_SUBST(PROLINGASOAP_LIBS) AC_SUBST(PROLINGASOAP_CXXFLAGS) dnl dnl Optional location of ProLinga-Data dnl PROLINGADATA_PREFIX="" PROLINGADATA_CXXFLAGS="" PROLINGADATA_LIBS="" PROLINGADATA_CONFIG_FILE="" if test "x$ENABLE_LOCAL_DATA" = xyes then dnl dnl specify location of ProLinga-Data dnl AC_ARG_WITH(prolingadata-prefix, [ --with-prolingadata-prefix=[PFX] Specify location of ProLinga-Data (Required for local data-engine)], PROLINGADATA_PREFIX=$withval ) AC_ARG_WITH(prolingadata-include-prefix, [ --with-prolingadata-include-prefix=[PFX] Specify location of ProLinga-Data headers (Required for local data-engine)], PROLINGADATA_CXXFLAGS="-I$withval" ) AC_ARG_WITH(prolingadata-libs-prefix, [ --with-prolingadata-libs-prefix=[PFX] Specify location of ProLinga-Data libs (Required for local data-engine)], PROLINGADATA_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for ProLinga-Data libraries >= $PROLINGADATA_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" if test $PROLINGADATA_PREFIX then PKG_CONFIG_SEARCH="$PROLINGADATA_PREFIX/lib64/pkgconfig:$PROLINGADATA_PREFIX/lib/pkgconfig:$PKG_CONFIG_SEARCH" fi if test $PROLINGADATA_LIBS then SEARCH_LIB=`echo $PROLINGADATA_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGADATA_PACKAGE >/dev/null 2>&1` then DATAVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGADATA_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$PROLINGADATA_REQUIRED_VERSION $PROLINGADATA_PACKAGE` then PROLINGADATA_CXXFLAGS="$PROLINGADATA_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $PROLINGADATA_PACKAGE`" PROLINGADATA_LIBS="$PROLINGADATA_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs $PROLINGADATA_PACKAGE`" PROLINGADATA_CONFIG_FILE="`export PKG_CONFIG_PATH; $PKG_CONFIG --variable=sysconfdir $PROLINGADATA_PACKAGE`/$PROLINGADATA_CONFIG_FILE_NAME" AC_MSG_RESULT($DATAVERS found) else AC_MSG_ERROR(Version $DATAVERS found. You need at least ProLinga-Data $PROLINGADATA_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGADATA_PACKAGE` AC_MSG_ERROR([Could not find ProLinga-Data or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.prolinga.org/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for ProLinga-Data libraries ) if test -f `echo $PROLINGADATA_LIBS | sed -e 's/-L//'`/libprolingadata.la || test -f $PROLINGADATA_PREFIX/lib/libprolingadata.la \ || test -f /usr/lib/libprolingadata.la || test -f /usr/local/lib/libprolingadata.la \ || test -f /usr/lib64/libprolingadata.la || test -f /usr/local/lib64/libprolingadata.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find ProLinga-Data anywhere, check http://www.prolinga.org/.]) fi if test $PROLINGADATA_PREFIX then PROLINGADATA_CXXFLAGS="$PROLINGADATA_CXXFLAGS -I$PROLINGADATA_PREFIX/include" PROLINGADATA_LIBS="$PROLINGADATA_LIBS -L$PROLINGADATA_PREFIX/lib" PROLINGADATA_CONFIG_FILE="$PROLINGADATA_PREFIX/etc/$PROLINGADATA_CONFIG_FILE_NAME" fi fi DEFINE_BUILD_DATA="-DBUILD_DATA" AC_SUBST(DEFINE_BUILD_DATA) INSERT_DATA_CONFIG="insert_data_config" AC_SUBST(INSERT_DATA_CONFIG) fi dnl export values AC_SUBST(PROLINGADATA_LIBS) AC_SUBST(PROLINGADATA_CXXFLAGS) AC_SUBST(PROLINGADATA_CONFIG_FILE) dnl dnl Optional location of ProLinga-Repository dnl PROLINGAREPOSITORY_PREFIX="" PROLINGAREPOSITORY_CXXFLAGS="" PROLINGAREPOSITORY_LIBS="" PROLINGAREPOSITORY_CONFIG_FILE="" if test "x$ENABLE_LOCAL_REPOSITORY" = xyes then dnl dnl specify location of ProLinga-Repository dnl AC_ARG_WITH(prolingarepository-prefix, [ --with-prolingarepository-prefix=[PFX] Specify location of ProLinga-Repository (Required for local repository)], PROLINGAREPOSITORY_PREFIX=$withval ) AC_ARG_WITH(prolingarepository-include-prefix, [ --with-prolingarepository-include-prefix=[PFX] Specify location of ProLinga-Repository headers (Required for local repository)], PROLINGAREPOSITORY_CXXFLAGS="-I$withval" ) AC_ARG_WITH(prolingarepository-libs-prefix, [ --with-prolingarepository-libs-prefix=[PFX] Specify location of ProLinga-Repository libs (Required for local repository)], PROLINGAREPOSITORY_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for ProLinga-Repository libraries >= $PROLINGAREPOSITORY_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" if test $PROLINGAREPOSITORY_PREFIX then PKG_CONFIG_SEARCH="$PROLINGAREPOSITORY_PREFIX/lib64/pkgconfig:$PROLINGAREPOSITORY_PREFIX/lib/pkgconfig:$PKG_CONFIG_SEARCH" fi if test $PROLINGAREPOSITORY_LIBS then SEARCH_LIB=`echo $PROLINGAREPOSITORY_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAREPOSITORY_PACKAGE >/dev/null 2>&1` then REPOSITORYVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAREPOSITORY_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$PROLINGAREPOSITORY_REQUIRED_VERSION $PROLINGAREPOSITORY_PACKAGE` then PROLINGAREPOSITORY_CXXFLAGS="$PROLINGAREPOSITORY_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $PROLINGAREPOSITORY_PACKAGE`" PROLINGAREPOSITORY_LIBS="$PROLINGAREPOSITORY_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs $PROLINGAREPOSITORY_PACKAGE`" PROLINGAREPOSITORY_CONFIG_FILE="`export PKG_CONFIG_PATH; $PKG_CONFIG --variable=sysconfdir $PROLINGAREPOSITORY_PACKAGE`/$PROLINGAREPOSITORY_CONFIG_FILE_NAME" AC_MSG_RESULT($REPOSITORYVERS found) else AC_MSG_ERROR(Version $REPOSITORYVERS found. You need at least ProLinga-Repository $PROLINGAREPOSITORY_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAREPOSITORY_PACKAGE` AC_MSG_ERROR([Could not find ProLinga-Repository or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.prolinga.org/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for ProLinga-Repository libraries ) if test -f `echo $PROLINGAREPOSITORY_LIBS | sed -e 's/-L//'`/libprolingarepository.la || test -f $PROLINGAREPOSITORY_PREFIX/lib/libprolingarepository.la \ || test -f /usr/lib64/libprolingarepository.la || test -f /usr/local/lib64/libprolingarepository.la \ || test -f /usr/lib/libprolingarepository.la || test -f /usr/local/lib/libprolingarepository.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find ProLinga-Repository anywhere, check http://www.prolinga.org/.]) fi if test $PROLINGAREPOSITORY_PREFIX then PROLINGAREPOSITORY_CXXFLAGS="$PROLINGAREPOSITORY_CXXFLAGS -I$PROLINGAREPOSITORY_PREFIX/include" PROLINGAREPOSITORY_LIBS="$PROLINGAREPOSITORY_LIBS -L$PROLINGAREPOSITORY_PREFIX/lib" PROLINGAREPOSITORY_CONFIG_FILE="$PROLINGAREPOSITORY_PREFIX/etc/$PROLINGAREPOSITORY_CONFIG_FILE_NAME" fi fi DEFINE_BUILD_REPOSITORY="-DBUILD_REPOSITORY" AC_SUBST(DEFINE_BUILD_REPOSITORY) INSERT_REPOSITORY_CONFIG="insert_repository_config" AC_SUBST(INSERT_REPOSITORY_CONFIG) fi dnl export values AC_SUBST(PROLINGAREPOSITORY_LIBS) AC_SUBST(PROLINGAREPOSITORY_CXXFLAGS) AC_SUBST(PROLINGAREPOSITORY_CONFIG_FILE) dnl dnl Optional location of ProLinga-Validate dnl PROLINGAVALIDATE_PREFIX="" PROLINGAVALIDATE_CXXFLAGS="" PROLINGAVALIDATE_LIBS="" PROLINGAVALIDATE_CONFIG_FILE="" if test "x$ENABLE_LOCAL_VALIDATE" = xyes then dnl dnl specify location of ProLinga-Validate dnl AC_ARG_WITH(prolingavalidate-prefix, [ --with-prolingavalidate-prefix=[PFX] Specify location of ProLinga-Validate (Required for local validate-engine)], PROLINGAVALIDATE_PREFIX=$withval ) AC_ARG_WITH(prolingavalidate-include-prefix, [ --with-prolingavalidate-include-prefix=[PFX] Specify location of ProLinga-Validate headers (Required for local validate-engine)], PROLINGAVALIDATE_CXXFLAGS="-I$withval" ) AC_ARG_WITH(prolingavalidate-libs-prefix, [ --with-prolingavalidate-libs-prefix=[PFX] Specify location of ProLinga-Validate libs (Required for local validate-engine)], PROLINGAVALIDATE_LIBS="-L$withval" ) dnl dnl use pkg-config if available dnl if test "x$PKG_CONFIG" != "xno" then dnl use pkg-config for version check and compile/link flag detection. AC_MSG_CHECKING(for ProLinga-Validate libraries >= $PROLINGAVALIDATE_REQUIRED_VERSION) dnl create pkg-config search path PKG_CONFIG_SEARCH="/usr/lib64/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig" if test $PROLINGAVALIDATE_PREFIX then PKG_CONFIG_SEARCH="$PROLINGAVALIDATE_PREFIX/lib64/pkgconfig:$PROLINGAVALIDATE_PREFIX/lib/pkgconfig:$PKG_CONFIG_SEARCH" fi if test $PROLINGAVALIDATE_LIBS then SEARCH_LIB=`echo $PROLINGAVALIDATE_LIBS | sed -e 's/-L//'` PKG_CONFIG_SEARCH="$PKG_CONFIG_SEARCH:$SEARCH_LIB/pkgconfig" fi PKG_CONFIG_PATH="$PKG_CONFIG_SEARCH:$PKG_CONFIG_PATH" dnl check version if `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAVALIDATE_PACKAGE >/dev/null 2>&1` then VALIDATEVERS=`export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAVALIDATE_PACKAGE` if `export PKG_CONFIG_PATH; $PKG_CONFIG --atleast-version=$PROLINGAVALIDATE_REQUIRED_VERSION $PROLINGAVALIDATE_PACKAGE` then PROLINGAVALIDATE_CXXFLAGS="$PROLINGAVALIDATE_CXXFLAGS `export PKG_CONFIG_PATH; $PKG_CONFIG --cflags $PROLINGAVALIDATE_PACKAGE`" PROLINGAVALIDATE_LIBS="$PROLINGAVALIDATE_LIBS `export PKG_CONFIG_PATH; $PKG_CONFIG --libs $PROLINGAVALIDATE_PACKAGE`" PROLINGAVALIDATE_CONFIG_FILE="`export PKG_CONFIG_PATH; $PKG_CONFIG --variable=sysconfdir $PROLINGAVALIDATE_PACKAGE`/$PROLINGAVALIDATE_CONFIG_FILE_NAME" AC_MSG_RESULT($VALIDATEVERS found) else AC_MSG_ERROR(Version $VALIDATEVERS found. You need at least ProLinga-Repository $PROLINGAVALIDATE_REQUIRED_VERSION for this version of ProLinga-Run) fi else `export PKG_CONFIG_PATH; $PKG_CONFIG --modversion $PROLINGAVALIDATE_PACKAGE` AC_MSG_ERROR([Could not find ProLinga-Validate or one of its dependencies. Check that PKG_CONFIG_PATH contains the correct package settings. Check http://www.prolinga.org/ for more info.]) fi else dnl check if libraries are there AC_MSG_CHECKING(for ProLinga-Validate libraries ) if test -f `echo $PROLINGAVALIDATE_LIBS | sed -e 's/-L//'`/libprolingavalidate.la || test -f $PROLINGAVALIDATE_PREFIX/lib/libprolingavalidate.la \ || test -f /usr/lib64/libprolingavalidate.la || test -f /usr/local/lib64/libprolingavalidate.la \ || test -f /usr/lib/libprolingavalidate.la || test -f /usr/local/lib/libprolingavalidate.la then AC_MSG_RESULT(found) else AC_MSG_ERROR([Could not find ProLinga-Validate anywhere, check http://www.prolinga.org/.]) fi if test $PROLINGAVALIDATE_PREFIX then PROLINGAVALIDATE_CXXFLAGS="$PROLINGAVALIDATE_CXXFLAGS -I$PROLINGAVALIDATE_PREFIX/include" PROLINGAVALIDATE_LIBS="$PROLINGAVALIDATE_LIBS -L$PROLINGAVALIDATE_PREFIX/lib" PROLINGAVALIDATE_CONFIG_FILE="$PROLINGAVALIDATE_PREFIX/etc/$PROLINGAVALIDATE_CONFIG_FILE_NAME" fi fi DEFINE_BUILD_VALIDATE="-DBUILD_VALIDATE" AC_SUBST(DEFINE_BUILD_VALIDATE) INSERT_VALIDATE_CONFIG="insert_validate_config" AC_SUBST(INSERT_VALIDATE_CONFIG) fi dnl export values AC_SUBST(PROLINGAVALIDATE_LIBS) AC_SUBST(PROLINGAVALIDATE_CXXFLAGS) AC_SUBST(PROLINGAVALIDATE_CONFIG_FILE) dnl create output values AC_OUTPUT(Makefile prolinga-run.pc src/Makefile prolinga/prolingaruncfg.xml prolinga/Makefile doc/Makefile doc/version.txt)