diff --git a/perl/.cvsignore b/perl/.cvsignore index ec86ab39..c4c7bbf6 100644 --- a/perl/.cvsignore +++ b/perl/.cvsignore @@ -1 +1,4 @@ -Libgtop.xs Makefile blib pm_to_blib Libgtop.c Libgtop.bs Makefile.PL +Automakefile Automakefile.in +configure config.h Makefile.PL blib Libgtop.xs +Makefile pm_to_blib Libgtop.c +stamp.h.in features.def Libgtop.bs diff --git a/perl/AUTHORS b/perl/AUTHORS new file mode 100644 index 00000000..e69de29b diff --git a/perl/Automakefile.am b/perl/Automakefile.am new file mode 100644 index 00000000..45eec654 --- /dev/null +++ b/perl/Automakefile.am @@ -0,0 +1,33 @@ +## Process this file with automake to produce Makefile.in. + +EXTRA_DIST = Makefile.PL.in perl.awk Names/Makefile.PL.in Names/names.awk + +noinst_DATA = $(top_builddir)/Libgtop.xs \ + $(top_builddir)/Names/Names.xs + +Libgtop.xs: perl.awk $(top_builddir)/config.h $(top_builddir)/features.def + $(AWK) -f $(top_srcdir)/perl.awk < $(top_builddir)/features.def > lgt-t + mv lgt-t Libgtop.xs + +Names/Names.xs: Names/names.awk $(top_builddir)/config.h $(top_builddir)/features.def + $(AWK) -f $(top_srcdir)/Names/names.awk < $(top_builddir)/features.def > Names/lgtn-t + mv Names/lgtn-t Names/Names.xs + +Makefile Names/Makefile: Libgtop.xs Names/Names.xs Makefile.PL Names/Makefile.PL + perl $(top_builddir)/Makefile.PL + +all: Makefile Names/Makefile + $(MAKE) -f Makefile + +clean-local: + (cd Names && rm -rf Names.c blib Makefile.aperl perlmain.c mon.out \ + core so_locations pm_to_blib *~ */*~ */*/*~ *.o *.a perl.exe \ + Names.bs Names.bso Names.def Names.exp Makefile.old ) + rm -rf Libgtop.c ./blib Makefile.aperl perlmain.c mon.out core \ + so_locations pm_to_blib *~ */*~ */*/*~ *.o *.a perl.exe \ + Libgtop.bs Libgtop.bso Libgtop.def Libgtop.exp Makefile.old + +distclean-local: + (cd Names && rm -rf Makefile Makefile.PL Names.xs ) + rm -rf Makefile Makefile.PL Libgtop.xs + diff --git a/perl/ChangeLog b/perl/ChangeLog index 6575c5eb..cf07c681 100644 --- a/perl/ChangeLog +++ b/perl/ChangeLog @@ -1,3 +1,8 @@ +1998-10-11 Martin Baulig + + * configure.in, automake.sh, Automakefile.am: New files. + This is now a package of its own. + 1998-10-10 Martin Baulig * Names: New directory. Defines `Libgtop::Names' module with diff --git a/perl/MANIFEST b/perl/MANIFEST index 37a586cd..8af0f1eb 100644 --- a/perl/MANIFEST +++ b/perl/MANIFEST @@ -1,7 +1,31 @@ .cvsignore +AUTHORS +Automakefile.am +COPYING +ChangeLog +INSTALL Libgtop.pm +Libgtop.xs MANIFEST +MANIFEST.SKIP +Makefile.PL Makefile.PL.in +NEWS +NO-AUTO-GEN +Names/.cvsignore +Names/MANIFEST +Names/Makefile.PL +Names/Makefile.PL.in +Names/Names.pm +Names/Names.xs +Names/names.awk +Names/test.pl +README +acconfig.h +autogen.sh +configure.in +features.def new.pl perl.awk test.pl +typemap diff --git a/perl/MANIFEST.SKIP b/perl/MANIFEST.SKIP new file mode 100644 index 00000000..ecd3e672 --- /dev/null +++ b/perl/MANIFEST.SKIP @@ -0,0 +1,22 @@ +\bblib\b +~$ +\.swp$ +\bstamp +^Libgtop- +^Automakefile$ +^Automakefile\.in$ +\bCVS\b +\.bs$ +\.o$ +\.bak$ +^config\.cache$ +^config\.status$ +^configure$ +^config\.log$ +^config\.h +\bMakefile\.old$ +^Libgtop\.c$ +\bMakefile$ +^aclocal\.m4$ +^Names/Names\.c$ +\bpm_to_blib\b diff --git a/perl/NEWS b/perl/NEWS new file mode 100644 index 00000000..e69de29b diff --git a/perl/NO-AUTO-GEN b/perl/NO-AUTO-GEN new file mode 100644 index 00000000..e69de29b diff --git a/perl/Names/MANIFEST b/perl/Names/MANIFEST index cf3e9ee9..8169db62 100644 --- a/perl/Names/MANIFEST +++ b/perl/Names/MANIFEST @@ -3,3 +3,8 @@ Makefile.PL.in Names.pm names.awk test.pl +Names.pm +Names.xs +names.awk +test.pl +.cvsignore diff --git a/perl/README b/perl/README new file mode 100644 index 00000000..e69de29b diff --git a/perl/acconfig.h b/perl/acconfig.h new file mode 100644 index 00000000..1f9c1265 --- /dev/null +++ b/perl/acconfig.h @@ -0,0 +1,33 @@ +#undef HAVE_LC_MESSAGES +#undef HAVE_STPCPY +#undef PACKAGE +#undef VERSION +#undef ENABLE_NLS +#undef HAVE_LC_MESSAGES +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_LIBSM +#undef HAVE_PROGRAM_INVOCATION_NAME +#undef HAVE_PROGRAM_INVOCATION_SHORT_NAME + +#undef HAVE_LIBGTOP +#undef NEED_LIBGTOP + +/* Define if LibGTop has support for multiple processors. */ +#undef HAVE_LIBGTOP_SMP + +/* Define if there is no `u_int64_t' and `int64_t'. */ +#undef u_int64_t +#undef int64_t + +/* LibGTop major, minor and micro version. */ +#undef LIBGTOP_MAJOR_VERSION +#undef LIBGTOP_MINOR_VERSION +#undef LIBGTOP_MICRO_VERSION + +/* LibGTop version and numerical version code ("1.234.567" -> 1234567). */ +#undef LIBGTOP_VERSION +#undef LIBGTOP_VERSION_CODE + +/* LibGTop server version, increased each time the protocol changes. */ +#undef LIBGTOP_SERVER_VERSION diff --git a/perl/autogen.sh b/perl/autogen.sh new file mode 100755 index 00000000..a3a21ff4 --- /dev/null +++ b/perl/autogen.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +PKG_NAME="LibGTop Perl Interface" + +(test -f $srcdir/configure.in \ + && test -f $srcdir/Libgtop.pm ) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level $PKG_NAME directory" + exit 1 +} + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have "\`autoconf\'" installed to compile Gnome." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have "\`automake\'" installed to compile Gnome." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing "\`aclocal\'". The version of "\`automake\' + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run "\`configure\'" with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for j in $srcdir +do + i=`dirname $j` + if test -f $i/REAL-NO-AUTO-GEN; then + echo skipping $i -- flagged as no auto-gen + else + macrodirs=$srcdir'/../macros' + echo processing $i + ## debug + test -n "$macrodirs" && echo \`aclocal\' will also look in \`$macrodirs\' + (cd $i; \ + aclocalinclude="$ACLOCAL_FLAGS"; \ + for k in $macrodirs; do \ + if test -d $k; then aclocalinclude="$aclocalinclude -I $k"; \ + else echo "**Warning**: No such directory \`$k'. Ignored."; fi; \ + done; \ + libtoolize --copy --force; \ + aclocal $aclocalinclude; \ + autoheader; automake --add-missing --gnu $am_opt Automakefile; \ + autoheader; autoconf) + fi +done + +if test x$NOCONFIGURE = x; then +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c +echo running $srcdir/configure $conf_flags "$@" +$srcdir/configure $conf_flags "$@" \ +&& echo Now type \`make -f Automakefile\' to compile $PKG_NAME +else +echo Skipping configure process. +fi diff --git a/perl/configure.in b/perl/configure.in new file mode 100644 index 00000000..5b810804 --- /dev/null +++ b/perl/configure.in @@ -0,0 +1,24 @@ + +AC_INIT(Libgtop.pm) + +AM_CONFIG_HEADER(config.h) +AM_INIT_AUTOMAKE(Libgtop, 0.29) + +AM_MAINTAINER_MODE + +dnl We don't use `AC_PROG_AWK' since it checks for mawk first which +dnl does not work for libgtop. +AC_CHECK_PROGS(AWK, gawk awk, ) +test -z "$AWK" && AC_MSG_ERROR([Sorry, you need a working awk interpreter.]) + +dnl Check for libgtop +GNOME_INIT_LIBGTOP(0.25, fail) + +dnl utility conditional +AM_CONDITIONAL(FALSE, test "x" = "y") + +AC_OUTPUT([ +Automakefile +Makefile.PL +Names/Makefile.PL +stamp.h],[]) diff --git a/perl/stamp-h.in b/perl/stamp-h.in new file mode 100644 index 00000000..9788f702 --- /dev/null +++ b/perl/stamp-h.in @@ -0,0 +1 @@ +timestamp