From 8f2b396347a24852a8ab27c18eb8531cbef10739 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 16 Aug 1998 23:22:13 +0000 Subject: New file. 1998-08-17 Martin Baulig * libgtop-conf.in: New file. --- ChangeLog | 4 ++++ Makefile.am | 10 +++++++++- libgtop-config.in | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 libgtop-config.in diff --git a/ChangeLog b/ChangeLog index 4e0a18b8..b3dac8e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1998-08-17 Martin Baulig + + * libgtop-conf.in: New file. + 1998-08-16 Martin Baulig * include/glibtop/loadavg.h (glibtop_loadavg): Added new diff --git a/Makefile.am b/Makefile.am index 03689bdb..2be98779 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,7 +22,7 @@ include_HEADERS = glibtop.h EXTRA_DIST = autogen.sh libgtop.spec copyright.txt libgtopConf.sh.in \ LIBGTOP-VERSION features.def perl/Makefile.PL.in perl/perl.awk \ - perl/MANIFEST perl/Changes + perl/MANIFEST perl/Changes libgtop-config.in release: $(MAKE) dist distdir=$(PACKAGE)$(VERSION) @@ -32,6 +32,8 @@ release: confexecdir=$(libdir) confexec_DATA = $(top_builddir)/libgtopConf.sh +bin_SCRIPTS = $(top_builddir)/libgtop-config + noinst_DATA = $(top_builddir)/perl/Makefile.PL \ $(top_builddir)/perl/Libgtop.xs @@ -71,6 +73,12 @@ libgtopConf.sh: libgtopConf.sh.in Makefile < $(srcdir)/libgtopConf.sh.in > libgtopConf.tmp \ && mv libgtopConf.tmp libgtopConf.sh +libgtop-config: libgtop-config.in Makefile + sed -e 's,\@LIBGTOP_LIBDIR\@,$(libdir),g' \ + < $(srcdir)/libgtop-config.in > libgtop-config.tmp \ + && mv libgtop-config.tmp libgtop-config && \ + chmod 755 libgtop-config + perl/Makefile.PL: perl/Makefile.PL.in Makefile ## Use sed and then mv to avoid problems if the user interrupts. sed -e 's,\@LIBGTOP_LIBDIR\@,$(libdir),g' \ diff --git a/libgtop-config.in b/libgtop-config.in new file mode 100644 index 00000000..47e9a6bf --- /dev/null +++ b/libgtop-config.in @@ -0,0 +1,32 @@ +#!/bin/sh + +usage="\ + Usage: libgtop-config [--version] [--config]" + +config_file="@LIBGTOP_LIBDIR@/libgtopConf.sh" +. $config_file + +if test $# -eq 0; then + echo "${usage}" 1>&2 + exit 1 +fi + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case $1 in + --version) + echo $LIBGTOP_VERSION + ;; + --config) + echo $config_file + ;; + *) + echo "${usage}" 1>&2 + exit 1 + esac + shift +done -- cgit v1.2.1