added proper autoconf macro to check for the GTK-- library
This commit is contained in:
parent
f790cf1965
commit
bd1e31da2a
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
#
|
||||
# Author : $Author: maroy $
|
||||
# Version : $Revision: 1.1 $
|
||||
# Version : $Revision: 1.2 $
|
||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/bin/autogen.sh,v $
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
@ -34,18 +34,24 @@
|
|||
package="gLiveSupport"
|
||||
|
||||
# assume we're in $basedir/bin
|
||||
basedir=`dirname $0`/..
|
||||
reldir=`dirname $0`/..
|
||||
basedir=`cd $reldir; pwd; cd -`
|
||||
echo ${basedir}
|
||||
test -z "$basedir" && basedir=.
|
||||
|
||||
bindir=$basedir/bin
|
||||
etcdir=$basedir/etc
|
||||
tmpdir=$basedir/tmp
|
||||
echo ${etcdir}
|
||||
echo ${tmpdir}
|
||||
|
||||
cd "$tmpdir"
|
||||
DIE=0
|
||||
|
||||
# look at all other directories as seen from ${basedir}/tmp
|
||||
tmpdir=.
|
||||
bindir=../bin
|
||||
etcdir=../etc
|
||||
#tmpdir=.
|
||||
#bindir=../bin
|
||||
#etcdir=../etc
|
||||
|
||||
(autoheader --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
|
@ -76,12 +82,15 @@ echo "Generating configuration files for $package, please wait...."
|
|||
|
||||
configure_ac=${etcdir}/configure.ac
|
||||
configure=${tmpdir}/configure
|
||||
aclocal_m4=${tmpdir}/aclocal.m4
|
||||
|
||||
#echo " aclocal $ACLOCAL_FLAGS"
|
||||
#aclocal $ACLOCAL_FLAGS
|
||||
# run aclocal in etc, as it's blind, only sees files in the current directory
|
||||
ACLOCAL_FLAGS="--output=${aclocal_m4}"
|
||||
echo " aclocal $ACLOCAL_FLAGS"
|
||||
cd ${etcdir} && aclocal $ACLOCAL_FLAGS && cd ${tmpdir}
|
||||
echo " autoheader ${configure_ac}"
|
||||
autoheader ${configure_ac}
|
||||
echo " autoconf -o ${configure} ${configure_ac}"
|
||||
autoconf -o ${configure} ${configure_ac}
|
||||
autoconf -I ${tmpdir} -o ${configure} ${configure_ac}
|
||||
|
||||
${configure} "$@" && echo
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#
|
||||
#
|
||||
# Author : $Author: maroy $
|
||||
# Version : $Revision: 1.1 $
|
||||
# Version : $Revision: 1.2 $
|
||||
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/Makefile.in,v $
|
||||
#
|
||||
# @configure_input@
|
||||
|
@ -68,8 +68,8 @@ STORAGE_LIB_DIR = ${STORAGE_DIR}/lib
|
|||
STORAGE_LIB = livesupport_storage
|
||||
STORAGE_LIB_FILE = ${STORAGE_LIB_DIR}/lib${STORAGE_LIB}.a
|
||||
|
||||
GTKMM_CFLAGS=`pkg-config gtkmm-2.0 --cflags`
|
||||
GTKMM_LIBS=`pkg-config gtkmm-2.0 --libs`
|
||||
GTKMM_CFLAGS=@GTKMM_CFLAGS@
|
||||
GTKMM_LIBS=@GTKMM_LIBS@
|
||||
|
||||
TEST_RESULTS = ${DOC_DIR}/testResults.xml
|
||||
# the text result XSLT has to be relative to the test result file, e.g. TMP_DIR
|
||||
|
@ -146,7 +146,7 @@ depclean: clean
|
|||
${MAKE} -C ${CORE_DIR} clean
|
||||
|
||||
distclean: clean docclean
|
||||
${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te*
|
||||
${RMDIR} ${TMP_DIR}/config* ${TMP_DIR}/autom4te* ${TMP_DIR}/*.m4
|
||||
|
||||
check: all ${TEST_RUNNER} run_tests
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
dnl-----------------------------------------------------------------------------
|
||||
dnl Copyright (c) 2004 Media Development Loan Fund
|
||||
dnl
|
||||
dnl This file is part of the LiveSupport project.
|
||||
dnl http://livesupport.campware.org/
|
||||
dnl To report bugs, send an e-mail to bugs@campware.org
|
||||
dnl
|
||||
dnl LiveSupport 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 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl LiveSupport 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 LiveSupport; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl
|
||||
dnl
|
||||
dnl Author : $Author: maroy $
|
||||
dnl Version : $Revision: 1.1 $
|
||||
dnl Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/acinclude.m4,v $
|
||||
dnl-----------------------------------------------------------------------------
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl Macro to check for available modules using pkg-conf
|
||||
dnl
|
||||
dnl usage:
|
||||
dnl PKG_CHECK_MODULES(GSTUFF,[gtk+-2.0 >= 1.3], action-if, action-not)
|
||||
dnl
|
||||
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
|
||||
dnl also defines GSTUFF_PKG_ERRORS on error
|
||||
dnl
|
||||
dnl This function was taken from the glade-- project
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_DEFUN(PKG_CHECK_MODULES, [
|
||||
succeeded=no
|
||||
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
if test "$PKG_CONFIG" = "no" ; then
|
||||
echo "*** The pkg-config script could not be found. Make sure it is"
|
||||
echo "*** in your path, or set the PKG_CONFIG environment variable"
|
||||
echo "*** to the full path to pkg-config."
|
||||
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
|
||||
else
|
||||
PKG_CONFIG_MIN_VERSION=0.9.0
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
|
||||
AC_MSG_CHECKING(for $2)
|
||||
|
||||
if $PKG_CONFIG --exists "$2" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
succeeded=yes
|
||||
|
||||
AC_MSG_CHECKING($1_CFLAGS)
|
||||
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
|
||||
AC_MSG_RESULT($$1_CFLAGS)
|
||||
|
||||
AC_MSG_CHECKING($1_LIBS)
|
||||
$1_LIBS=`$PKG_CONFIG --libs "$2"`
|
||||
AC_MSG_RESULT($$1_LIBS)
|
||||
else
|
||||
$1_CFLAGS=""
|
||||
$1_LIBS=""
|
||||
## If we have a custom action on failure, don't print errors, but
|
||||
## do set a variable so people can do so.
|
||||
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
|
||||
ifelse([$4], ,echo $$1_PKG_ERRORS,)
|
||||
fi
|
||||
|
||||
AC_SUBST($1_CFLAGS)
|
||||
AC_SUBST($1_LIBS)
|
||||
else
|
||||
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
|
||||
echo "*** See http://www.freedesktop.org/software/pkgconfig"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $succeeded = yes; then
|
||||
ifelse([$3], , :, [$3])
|
||||
else
|
||||
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
dnl
|
||||
dnl
|
||||
dnl Author : $Author: maroy $
|
||||
dnl Version : $Revision: 1.1 $
|
||||
dnl Version : $Revision: 1.2 $
|
||||
dnl Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/etc/configure.ac,v $
|
||||
dnl-----------------------------------------------------------------------------
|
||||
|
||||
|
@ -35,7 +35,7 @@ dnl-----------------------------------------------------------------------------
|
|||
AC_INIT(gLiveSupport, 0.1, bugs@campware.org)
|
||||
AC_PREREQ(2.59)
|
||||
AC_COPYRIGHT([Copyright (c) 2004 Media Development Loan Fund under the GNU GPL])
|
||||
AC_REVISION($Revision: 1.1 $)
|
||||
AC_REVISION($Revision: 1.2 $)
|
||||
|
||||
AC_CONFIG_SRCDIR(../src/main.cxx)
|
||||
|
||||
|
@ -45,6 +45,10 @@ AC_PROG_CXX()
|
|||
AC_CHECK_HEADERS(sys/types.h unistd.h getopt.h signal.h sys/stat.h time.h)
|
||||
AC_CHECK_HEADERS(stdio.h fcntl.h pthread.h sys/time.h)
|
||||
|
||||
PKG_CHECK_MODULES(GTKMM,[gtkmm-2.0 >= 2.2.0])
|
||||
AC_SUBST(GTKMM_CFLAGS)
|
||||
AC_SUBST(GTKMM_LIBS)
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl enable compilaton for code coverage data
|
||||
dnl-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue