2011-05-31 06:38:50 +00:00
|
|
|
AC_INIT([Distributed Computing API], [0.11], [desktopgrid@lpds.sztaki.hu], [dcapi])
|
2005-12-08 14:18:56 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([cf])
|
2005-12-06 15:36:31 +00:00
|
|
|
AC_CONFIG_HEADERS([include/config.h])
|
|
|
|
AC_CONFIG_AUX_DIR([scripts])
|
|
|
|
AC_CONFIG_SRCDIR([include/dc.h])
|
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
|
|
|
|
AC_PROG_CC
|
2008-09-15 13:02:17 +00:00
|
|
|
AC_PROG_CXX
|
2005-12-06 15:36:31 +00:00
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
LIBTOOL="$LIBTOOL --silent"
|
|
|
|
|
2006-04-05 13:14:33 +00:00
|
|
|
dnl Enable useful warnings
|
2005-12-08 14:18:56 +00:00
|
|
|
if test "$ac_cv_c_compiler_gnu" = yes; then
|
|
|
|
CFLAGS="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare ${CFLAGS}"
|
|
|
|
CXXFLAGS="-Wall -Wsign-compare ${CXXFLAGS}"
|
2005-12-06 15:36:31 +00:00
|
|
|
fi
|
|
|
|
|
2006-04-05 13:14:33 +00:00
|
|
|
AC_ARG_ENABLE([client],
|
|
|
|
AS_HELP_STRING([--disable-client], [do not build the client application]),,
|
|
|
|
[enable_client=yes])
|
|
|
|
AC_ARG_ENABLE([master],
|
|
|
|
AS_HELP_STRING([--disable-master], [do not build the master application]),,
|
|
|
|
[enable_master=yes])
|
2006-03-09 15:17:58 +00:00
|
|
|
|
2006-02-15 16:58:45 +00:00
|
|
|
AM_CONDITIONAL([BUILD_CLIENT], [test "$enable_client" = yes])
|
|
|
|
AM_CONDITIONAL([BUILD_MASTER], [test "$enable_master" = yes])
|
2005-12-06 15:36:31 +00:00
|
|
|
|
2006-07-26 12:11:14 +00:00
|
|
|
dnl glib is used only on the master side
|
|
|
|
if test "$enable_master" = yes; then
|
|
|
|
AM_PATH_GLIB_2_0([2.6.0],,[AC_MSG_ERROR([glib2 is missing])])
|
|
|
|
fi
|
2006-04-05 13:14:33 +00:00
|
|
|
|
2006-04-08 11:25:18 +00:00
|
|
|
GTK_DOC_CHECK([1.3])
|
2007-02-21 19:58:28 +00:00
|
|
|
MON_PKG_JAVA
|
2006-04-08 11:25:18 +00:00
|
|
|
|
2006-04-10 07:39:48 +00:00
|
|
|
BACKENDS=
|
|
|
|
|
2006-04-05 13:14:33 +00:00
|
|
|
dnl ===================================================================
|
|
|
|
dnl BOINC backend
|
|
|
|
dnl
|
2005-12-06 15:36:31 +00:00
|
|
|
|
2006-04-05 13:14:33 +00:00
|
|
|
AC_ARG_ENABLE([backend-boinc],
|
|
|
|
AS_HELP_STRING([--enable-backend-boinc],
|
|
|
|
[enable the BOINC backend @<:@default=yes@:>@]),,
|
2006-07-12 08:41:22 +00:00
|
|
|
[enable_backend_boinc=auto])
|
2005-12-06 15:36:31 +00:00
|
|
|
|
2006-07-12 08:41:22 +00:00
|
|
|
if test "$enable_backend_boinc" != no; then
|
2006-07-26 12:11:14 +00:00
|
|
|
SZDG_BOINC_COMMON
|
2006-04-05 13:14:33 +00:00
|
|
|
if test "$enable_master" = yes; then
|
|
|
|
SZDG_BOINC_SERVER
|
|
|
|
fi
|
2006-07-12 08:41:22 +00:00
|
|
|
if test "$enable_client" = yes; then
|
|
|
|
SZDG_BOINC_CLIENT
|
|
|
|
AC_CHECK_HEADERS([uuid/uuid.h],, [no_boinc=yes])
|
|
|
|
AC_CHECK_LIB([uuid], [uuid_unparse_lower], [true], [no_boinc=yes])
|
|
|
|
fi
|
2006-04-05 13:14:33 +00:00
|
|
|
if test "$no_boinc" = yes; then
|
2006-07-12 08:41:22 +00:00
|
|
|
if test "$enable_backend_boinc" = yes; then
|
|
|
|
AC_MSG_ERROR([BOINC development environment was not found])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
BACKENDS="$BACKENDS boinc"
|
2006-04-05 13:14:33 +00:00
|
|
|
fi
|
2006-02-15 16:58:45 +00:00
|
|
|
fi
|
|
|
|
|
2006-07-12 08:41:22 +00:00
|
|
|
AM_CONDITIONAL([WITH_BOINC], [echo $BACKENDS | grep -q boinc])
|
2006-04-05 13:14:33 +00:00
|
|
|
|
2006-04-10 07:39:48 +00:00
|
|
|
dnl ===================================================================
|
|
|
|
dnl Condor backend
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([backend-condor],
|
|
|
|
AS_HELP_STRING([--enable-backend-condor],
|
|
|
|
[enable the Condor backend @<:@default=no@:>@]),,
|
2006-07-12 08:41:22 +00:00
|
|
|
[enable_backend_condor=auto])
|
2006-04-10 07:39:48 +00:00
|
|
|
|
2006-06-20 14:24:48 +00:00
|
|
|
AC_ARG_WITH([condor-headers],
|
|
|
|
AS_HELP_STRING([--with-condor-headers=DIR],
|
|
|
|
[Use condor headers in DIR]), [CONDOR_CPPFLAGS="-I$withval"])
|
|
|
|
AC_ARG_WITH([condor-libs],
|
|
|
|
AS_HELP_STRING([--with-condor-libs=DIR],
|
|
|
|
[Use condor libraries in DIR]), [CONDOR_LDFLAGS="-L$withval"])
|
|
|
|
AC_SUBST([CONDOR_CPPFLAGS])
|
|
|
|
AC_SUBST([CONDOR_LDFLAGS])
|
|
|
|
|
2006-07-12 08:41:22 +00:00
|
|
|
no_condor=
|
|
|
|
if test "$enable_backend_condor" != no; then
|
2006-06-20 14:24:48 +00:00
|
|
|
AC_LANG_PUSH([C++])
|
|
|
|
save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $CONDOR_CPPFLAGS"
|
|
|
|
save_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS $CONDOR_LDFLAGS"
|
2009-07-06 10:48:20 +00:00
|
|
|
AC_CHECK_HEADERS([read_user_log.h],, [no_condor=yes],
|
2006-06-20 14:24:48 +00:00
|
|
|
[AC_INCLUDES_DEFAULT
|
|
|
|
#include <time.h>
|
|
|
|
])
|
|
|
|
LDFLAGS="$save_LDFLAGS"
|
|
|
|
CPPFLAGS="$save_CPPFLAGS"
|
|
|
|
AC_LANG_POP([C++])
|
|
|
|
|
2006-07-12 08:41:22 +00:00
|
|
|
if test "$no_condor" = yes; then
|
|
|
|
if test "$enable_backend_condor" = yes; then
|
|
|
|
AC_MSG_ERROR([Condor development environment is missing])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
BACKENDS="$BACKENDS condor"
|
|
|
|
fi
|
2006-04-10 07:39:48 +00:00
|
|
|
fi
|
|
|
|
|
2006-07-12 08:41:22 +00:00
|
|
|
AM_CONDITIONAL([WITH_CONDOR], [echo $BACKENDS | grep -q condor])
|
2006-04-10 07:39:48 +00:00
|
|
|
|
2006-04-05 13:14:33 +00:00
|
|
|
dnl ===================================================================
|
|
|
|
dnl Local backend
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([backend-local],
|
|
|
|
AS_HELP_STRING([--enable-backend-local],
|
|
|
|
[enable the local backend @<:@default=yes@:>@]),,
|
2006-04-10 07:39:48 +00:00
|
|
|
[enable_backend_local=yes])
|
|
|
|
|
|
|
|
if test "$enable_backend_local" = yes; then
|
|
|
|
BACKENDS="$BACKENDS local"
|
|
|
|
fi
|
2006-04-05 13:14:33 +00:00
|
|
|
|
|
|
|
AM_CONDITIONAL([WITH_LOCAL], [test "$enable_backend_local" == yes])
|
|
|
|
|
|
|
|
dnl ===================================================================
|
|
|
|
dnl Generate output files
|
|
|
|
dnl
|
2005-12-06 15:36:31 +00:00
|
|
|
|
2006-04-10 07:39:48 +00:00
|
|
|
echo ""
|
|
|
|
echo "Enabled backends: $BACKENDS"
|
2006-05-19 14:04:33 +00:00
|
|
|
echo "Build master: $enable_master"
|
|
|
|
echo "Build client: $enable_client"
|
2006-04-10 07:39:48 +00:00
|
|
|
echo ""
|
|
|
|
|
2005-12-06 15:36:31 +00:00
|
|
|
AC_CONFIG_FILES([Makefile \
|
|
|
|
include/Makefile \
|
|
|
|
common/Makefile \
|
|
|
|
boinc/Makefile \
|
2006-04-17 19:50:47 +00:00
|
|
|
boinc/dcapi-boinc-client.pc \
|
|
|
|
boinc/dcapi-boinc-master.pc \
|
2006-04-10 07:39:48 +00:00
|
|
|
condor/Makefile \
|
2006-04-17 19:50:47 +00:00
|
|
|
condor/dcapi-condor-client.pc \
|
|
|
|
condor/dcapi-condor-master.pc \
|
2007-02-21 19:58:28 +00:00
|
|
|
local/Makefile \
|
|
|
|
local/dcapi-local-client.pc \
|
|
|
|
local/dcapi-local-master.pc \
|
|
|
|
java/Makefile \
|
|
|
|
java/hu/sztaki/lpds/dc/client/Version.java \
|
2006-05-19 14:04:33 +00:00
|
|
|
doc/Makefile])
|
2005-12-06 15:36:31 +00:00
|
|
|
AC_OUTPUT
|