Configure engine libs and cflags in gnucash-config.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5332 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-09-06 22:30:14 +00:00
parent e22f01c726
commit a78b5495c4
4 changed files with 37 additions and 10 deletions

View File

@ -70,7 +70,8 @@ gnucash-config: gnucash-config.in
rm -f $@.tmp
sed < $@.in > $@.tmp \
-e 's:@-VERSION-@:${VERSION}:g' \
-e 's:@-GNC_INCLUDE_DIR-@:${GNC_INCLUDE_DIR}:g'
-e 's:@-GNUCASH_ENGINE_CFLAGS-@:${GNUCASH_ENGINE_CFLAGS}:g' \
-e 's:@-GNUCASH_ENGINE_LIBS-@:${GNUCASH_ENGINE_LIBS}:g'
chmod +x $@.tmp
mv $@.tmp $@

View File

@ -124,6 +124,7 @@ fi
GNC_ACCOUNTS_DIR=${GNC_SHAREDIR}/accounts
GNC_GLADE_DIR=${GNC_SHAREDIR}/glade
GNC_MODULE_DIR='${pkglibdir}'
GNC_PIXMAP_DIR='${datadir}/pixmaps/gnucash'
AC_SUBST(GNC_ACCOUNTS_DIR)
@ -132,6 +133,7 @@ AC_SUBST(GNC_DOC_INSTALL_DIR)
AC_SUBST(GNC_GLADE_DIR)
AC_SUBST(GNC_INCLUDE_DIR)
AC_SUBST(GNC_LIBDIR)
AC_SUBST(GNC_MODULE_DIR)
AC_SUBST(GNC_PIXMAP_DIR)
AC_SUBST(GNC_SCM_INSTALL_DIR)
AC_SUBST(GNC_SHAREDIR)
@ -614,6 +616,22 @@ AC_TRY_RUN([
])
CFLAGS="$GNC_OLDCFLAGS"
### --------------------------------------------------------------------------
### GnuCash flags and libs configuration
GNUCASH_ENGINE_BASE_LIBS="${GUILE_LIBS} ${GLIB_LIBS}"
GNUCASH_ENGINE_LIBS="-L${GNC_MODULE_DIR} ${GNUCASH_ENGINE_BASE_LIBS} libgncmod-engine.la libgw-engine.la libgw-glib.la"
GNUCASH_ENGINE_BASE_CFLAGS="${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS} ${GUILE_INCS}"
GNUCASH_ENGINE_CFLAGS="-I${GNC_INCLUDE_DIR} ${GNUCASH_ENGINE_BASE_CFLAGS}"
AC_SUBST(GNUCASH_ENGINE_BASE_LIBS)
AC_SUBST(GNUCASH_ENGINE_LIBS)
AC_SUBST(GNUCASH_ENGINE_BASE_CFLAGS)
AC_SUBST(GNUCASH_ENGINE_CFLAGS)
### --------------------------------------------------------------------------
### Makefile creation

View File

@ -25,8 +25,6 @@ if test $# -eq 0; then
usage 1 1>&2
fi
lib_gnucash=yes
while test $# -gt 0; do
case "$1" in
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
@ -64,6 +62,7 @@ while test $# -gt 0; do
lib_engine=yes
;;
gnucash)
lib_engine=yes
lib_gnucash=yes
;;
*)
@ -74,17 +73,26 @@ while test $# -gt 0; do
done
if test "$echo_prefix" = "yes"; then
echo $prefix
echo $prefix
fi
if test "$echo_exec_prefix" = "yes"; then
echo $exec_prefix
echo $exec_prefix
fi
if test "$echo_cflags" = "yes"; then
echo -I@-GNC_INCLUDE_DIR-@
cflags=""
if test "$lib_engine" = "yes"; then
cflags="$cflags @-GNUCASH_ENGINE_CFLAGS-@"
fi
echo $cflags
fi
if test "$echo_libs" = "yes"; then
echo ""
libs=""
if test "$lib_engine" = "yes"; then
libs="$libs @-GNUCASH_ENGINE_LIBS-@"
fi
echo $libs
fi

View File

@ -2,9 +2,9 @@ SUBDIRS = . test-core test
pkglib_LTLIBRARIES = libgncmod-engine.la
CFLAGS = @CFLAGS@ ${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS}
CFLAGS = @CFLAGS@ ${GNUCASH_ENGINE_BASE_CFLAGS}
INCLUDES = -I${top_srcdir}/src/gnc-module ${GUILE_INCS} -I../
INCLUDES = -I${top_srcdir}/src/gnc-module -I../
libgncmod_engine_la_SOURCES = \
Account.c \
@ -83,7 +83,7 @@ noinst_HEADERS = \
md5.h
libgncmod_engine_la_LDFLAGS = -module
libgncmod_engine_la_LIBADD = ${GUILE_LIBS} ${GLIB_LIBS}
libgncmod_engine_la_LIBADD = ${GNUCASH_ENGINE_BASE_LIBS}
libgw_glib_la_SOURCES=gw-glib.c glib-helpers.c
libgw_glib_la_LDFLAGS=-module -lg-wrap-runtime-guile