From c2eab3dfd7075be6a01dcfff735ba09310751aec Mon Sep 17 00:00:00 2001 From: fgerlits Date: Sun, 20 May 2007 11:01:14 +0000 Subject: [PATCH] use cppunit >= 1.12.0 installed on the system, if present, and don't compile it --- campcaster/bin/autogen.sh | 4 ++++ campcaster/etc/Makefile.in | 14 +++++++++----- campcaster/etc/configure.ac | 27 +++++++++++++++++++++------ 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/campcaster/bin/autogen.sh b/campcaster/bin/autogen.sh index a8ec2dea6..030977034 100755 --- a/campcaster/bin/autogen.sh +++ b/campcaster/bin/autogen.sh @@ -79,5 +79,9 @@ configure=${tmpdir}/configure cp -f ${bindir}/install-sh ${tmpdir} cp -f ${configure_ac} ${tmpdir} +echo " aclocal" +aclocal + echo " autoconf -I ${tmpdir} -o ${configure} ${configure_ac}" autoconf -I ${tmpdir} -o ${configure} ${configure_ac} + diff --git a/campcaster/etc/Makefile.in b/campcaster/etc/Makefile.in index 6c0ecc4a5..9839486db 100644 --- a/campcaster/etc/Makefile.in +++ b/campcaster/etc/Makefile.in @@ -101,8 +101,8 @@ FLAWFINDER_FILE = ${DOC_DIR}/flawfinderReport.html TOOLS_DIR = ${SRC_DIR}/tools -CXXUNIT_DIR = ${TOOLS_DIR}/cppunit -CXXUNIT_VERSION = cppunit-1.10.2 +CPPUNIT_DIR = ${TOOLS_DIR}/cppunit +CPPUNIT_VERSION = cppunit-1.10.2 LIBODBCXX_DIR = ${TOOLS_DIR}/libodbc++ LIBODBCXX_VERSION = libodbc++-0.2.3-20050404 XMLRPCXX_DIR = ${TOOLS_DIR}/xmlrpc++ @@ -206,8 +206,10 @@ recompile: modprod_distclean modules_setup products_setup compile tools_setup: ${TMP_DIR}/tools_setup.stamp ${TMP_DIR}/tools_setup.stamp: - cd ${CXXUNIT_DIR}/${CXXUNIT_VERSION} && ./configure --prefix=${prefix} - ${MAKE} -C ${CXXUNIT_DIR}/${CXXUNIT_VERSION} install +ifeq ("@COMPILE_CPPUNIT@", "yes") + cd ${CPPUNIT_DIR}/${CPPUNIT_VERSION} && ./configure --prefix=${prefix} + ${MAKE} -C ${CPPUNIT_DIR}/${CPPUNIT_VERSION} install +endif cd ${LIBODBCXX_DIR}/${LIBODBCXX_VERSION} && ./configure --prefix=${prefix} ${MAKE} -C ${LIBODBCXX_DIR}/${LIBODBCXX_VERSION} install @@ -230,7 +232,9 @@ ${TMP_DIR}/tools_setup.stamp: touch ${TMP_DIR}/tools_setup.stamp tools_distclean: - -${MAKE} -C ${CXXUNIT_DIR}/${CXXUNIT_VERSION} distclean +ifeq ("@COMPILE_CPPUNIT@", "yes") + -${MAKE} -C ${CPPUNIT_DIR}/${CPPUNIT_VERSION} distclean +endif -${MAKE} -C ${LIBODBCXX_DIR}/${LIBODBCXX_VERSION} distclean -${MAKE} -C ${XMLRPCXX_DIR}/${XMLRPCXX_VERSION} distclean -${MAKE} -C ${GSTREAMER_DIR}/${GSTREAMER_VERSION} distclean diff --git a/campcaster/etc/configure.ac b/campcaster/etc/configure.ac index d762e203f..007316c3f 100644 --- a/campcaster/etc/configure.ac +++ b/campcaster/etc/configure.ac @@ -275,6 +275,21 @@ AC_ARG_WITH([studio-audio-cue], AC_MSG_RESULT([using audio cue device for studio: ${STUDIO_AUDIO_CUE}]) +dnl----------------------------------------------------------------------------- +dnl determine which optional packages will be compiled +dnl----------------------------------------------------------------------------- + +PKG_CHECK_EXISTS([cppunit >= 1.12.0], +[ + AC_MSG_RESULT([using cppunit found on the system]) + COMPILE_CPPUNIT="no" +], +[ + AC_MSG_RESULT([did not find cppunit >= 1.12.0, will compile from our own]) + COMPILE_CPPUNIT="yes" +]) + + dnl----------------------------------------------------------------------------- dnl set up the individual components dnl @@ -359,12 +374,12 @@ AC_MSG_NOTICE( [compiling the following external libraries that are needed by Campcaster: - cppunit 1.10.2 - gstreamer 0.8.12 - libodbc++ 0.2.3 - taglib 1.4 - xmlrpc++ 2004-07-13 - libserial 0.5.2 + cppunit 1.10.2 ${COMPILE_CPPUNIT} + gstreamer 0.8.12 yes + libodbc++ 0.2.3 yes + taglib 1.4 yes + xmlrpc++ 2004-07-13 yes + libserial 0.5.2 yes using the following configuration settings: