Create gnucash-config with configure instead of Makefile.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@5725 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas 2001-10-25 23:31:44 +00:00
parent d7e666acf0
commit 65d5050968
3 changed files with 32 additions and 30 deletions

View File

@ -51,7 +51,6 @@ EXTRA_DIST = \
bin_SCRIPTS = gnucash-config
BUILT_SOURCES = gnucash-config
CLEANFILES = gnucash-config
## We borrow guile's convention and use @-...-@ as the substitution
@ -72,24 +71,6 @@ make-gnucash-potfiles: make-gnucash-potfiles.in
chmod +x $@.tmp
mv $@.tmp $@
gnucash-config: gnucash-config.in
rm -f $@.tmp
sed < $@.in > $@.tmp \
-e 's:@-VERSION-@:${VERSION}:g' \
-e 's:@-GNUCASH_ENGINE_CFLAGS-@:${GNUCASH_ENGINE_CFLAGS}:g' \
-e 's:@-GNUCASH_ENGINE_LIBS-@:${GNUCASH_ENGINE_LIBS}:g' \
-e 's:@-GNUCASH_APP_UTILS_CFLAGS-@:${GNUCASH_APP_UTILS_CFLAGS}:g' \
-e 's:@-GNUCASH_APP_UTILS_LIBS-@:${GNUCASH_APP_UTILS_LIBS}:g' \
-e 's:@-GNUCASH_NETWORK_UTILS_CFLAGS-@:${GNUCASH_NETWORK_UTILS_CFLAGS}:g' \
-e 's:@-GNUCASH_NETWORK_UTILS_LIBS-@:${GNUCASH_NETWORK_UTILS_LIBS}:g' \
-e 's:@-GNUCASH_GNOME_UTILS_CFLAGS-@:${GNUCASH_GNOME_UTILS_CFLAGS}:g' \
-e 's:@-GNUCASH_GNOME_UTILS_LIBS-@:${GNUCASH_GNOME_UTILS_LIBS}:g' \
-e 's:@-GNUCASH_REGISTER_CORE_CFLAGS-@:${GNUCASH_REGISTER_CORE_CFLAGS}:g' \
-e 's:@-GNUCASH_REGISTER_CORE_LIBS-@:${GNUCASH_REGISTER_CORE_LIBS}:g'
chmod +x $@.tmp
mv $@.tmp $@
DISTCLEANFILES = \
cscope.files cscope.out etags.files make-gnucash-patch

View File

@ -817,6 +817,10 @@ AC_OUTPUT(
dnl # non-makefiles
dnl # Please read doc/build-system before adding *anything* here
dnl # we configure gnucash-config here because we *don't*
dnl # want variables to be fully expanded
gnucash-config
,
dnl # commands go here, but we don't have any right now
)

View File

@ -14,6 +14,7 @@ Options:
[--version]
[--libs]
[--cflags]
[--ld-library-path]
Libraries:
engine
network-utils
@ -38,6 +39,9 @@ while test $# -gt 0; do
esac
case $1 in
--ld-library-path)
echo_ld_library_path=yes
;;
--prefix=*)
prefix=$optarg
if test $exec_prefix_set = no ; then
@ -55,7 +59,7 @@ while test $# -gt 0; do
echo_exec_prefix=yes
;;
--version)
echo @-VERSION-@
echo @VERSION@
exit 0
;;
--cflags)
@ -95,6 +99,14 @@ while test $# -gt 0; do
shift
done
datadir=@datadir@
libdir=@libdir@
pkgdatadir=${datadir}/@PACKAGE@
pkglibdir=${libdir}/@PACKAGE@
pkgincludedir=${includedir}/@PACKAGE@
GNC_LIBDIR=@GNC_LIBDIR@
GNC_MODULE_DIR=@GNC_MODULE_DIR@
GNC_SHAREDIR=@GNC_SHAREDIR@
# Trim the link and compile lines down.
@ -139,23 +151,23 @@ if test "$echo_cflags" = "yes"; then
cflags=""
if test "$lib_engine" = "yes"; then
cflags="$cflags @-GNUCASH_ENGINE_CFLAGS-@"
cflags="$cflags @GNUCASH_ENGINE_CFLAGS@"
fi
if test "$lib_network_utils" = "yes"; then
cflags="$cflags @-GNUCASH_NETWORK_UTILS_CFLAGS-@"
cflags="$cflags @GNUCASH_NETWORK_UTILS_CFLAGS@"
fi
if test "$lib_app_utils" = "yes"; then
cflags="$cflags @-GNUCASH_APP_UTILS_CFLAGS-@"
cflags="$cflags @GNUCASH_APP_UTILS_CFLAGS@"
fi
if test "$lib_register_core" = "yes"; then
cflags="$cflags @-GNUCASH_REGISTER_CORE_CFLAGS-@"
cflags="$cflags @GNUCASH_REGISTER_CORE_CFLAGS@"
fi
if test "$lib_gnome_utils" = "yes"; then
cflags="$cflags @-GNUCASH_GNOME_UTILS_CFLAGS-@"
cflags="$cflags @GNUCASH_GNOME_UTILS_CFLAGS@"
fi
echo $cflags
@ -165,24 +177,29 @@ if test "$echo_libs" = "yes"; then
libs=""
if test "$lib_engine" = "yes"; then
libs="$libs @-GNUCASH_ENGINE_LIBS-@"
libs="$libs @GNUCASH_ENGINE_LIBS@"
fi
if test "$lib_network_utils" = "yes"; then
libs="$libs @-GNUCASH_NETWORK_UTILS_LIBS-@"
libs="$libs @GNUCASH_NETWORK_UTILS_LIBS@"
fi
if test "$lib_app_utils" = "yes"; then
libs="$libs @-GNUCASH_APP_UTILS_LIBS-@"
libs="$libs @GNUCASH_APP_UTILS_LIBS@"
fi
if test "$lib_register_core" = "yes"; then
libs="$libs @-GNUCASH_REGISTER_CORE_LIBS-@"
libs="$libs @GNUCASH_REGISTER_CORE_LIBS@"
fi
if test "$lib_gnome_utils" = "yes"; then
libs="$libs @-GNUCASH_GNOME_UTILS_LIBS-@"
libs="$libs @GNUCASH_GNOME_UTILS_LIBS@"
fi
echo $libs
fi
if test "$echo_ld_library_path" = "yes"; then
path="$libdir:$GNC_LIBDIR:$GNC_MODULE_DIR"
echo $path
fi