summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-08-16 23:22:13 +0000
committerMartin Baulig <martin@src.gnome.org>1998-08-16 23:22:13 +0000
commit8f2b396347a24852a8ab27c18eb8531cbef10739 (patch)
treeb1e6586d14b46c26b6861a88c4405e87465f56bd
parent3d611432e36bef8b7a3033740b3503f3af73f44c (diff)
downloadlibgtop-8f2b396347a24852a8ab27c18eb8531cbef10739.tar.gz
New file.
1998-08-17 Martin Baulig <martin@home-of-linux.org> * libgtop-conf.in: New file.
-rw-r--r--ChangeLog4
-rw-r--r--Makefile.am10
-rw-r--r--libgtop-config.in32
3 files changed, 45 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4e0a18b8..b3dac8e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1998-08-17 Martin Baulig <martin@home-of-linux.org>
+
+ * libgtop-conf.in: New file.
+
1998-08-16 Martin Baulig <martin@home-of-linux.org>
* 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