summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <baulig@taurus.uni-trier.de>1998-06-06 22:26:40 +0000
committerMartin Baulig <martin@src.gnome.org>1998-06-06 22:26:40 +0000
commit85f31a170768f2345e697b42e9bde1bfae252dbb (patch)
tree48e52541f8f87644137a2bf0bcf549e7a4ae025d
parent92ec7c6d333952284f49fe72db1dddd598f23693 (diff)
downloadlibgtop-85f31a170768f2345e697b42e9bde1bfae252dbb.tar.gz
removed that directory.
1998-06-05 Martin Baulig <baulig@taurus.uni-trier.de> * support: removed that directory. * configure.in: we check whether '-lgnomesupport' is included in $GNOME_LIBS and add it together with $GNOME_LIBDIR to LIBSUPPORT in this case. Gnome (gnome-libs) is now required to build libgtop, added short comment to configure.in how to revert this change. * Makefile.am: removed `support' subdir. 1998-06-03 Martin Baulig <baulig@merkur.uni-trier.de> * libgtop.spec: New file. * Makefile.am (EXTRA_DIST): Added `autogen.sh' and `libgtop.spec'. * configure.in (LIBGTOP_INCS): is now identically to `LIBGTOP_GUILE_INCS'. * include/glibtop/global.h: only including intl headers while compiling libgtop. Merging changes from LIBGTOP_STABLE_0_20 into the main trunk.
-rw-r--r--ChangeLog27
-rw-r--r--Makefile.am6
-rw-r--r--acinclude.m4613
-rw-r--r--configure.in33
-rw-r--r--include/glibtop/global.h2
5 files changed, 114 insertions, 567 deletions
diff --git a/ChangeLog b/ChangeLog
index b3afca51..c499dfc8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,33 @@
* sysdeps/names/*.c (glibtop_types_*): Using numeric
constants from `types.h' instead of string constants.
+1998-06-05 Martin Baulig <baulig@taurus.uni-trier.de>
+
+ * support: removed that directory.
+
+ * configure.in: we check whether '-lgnomesupport' is
+ included in $GNOME_LIBS and add it together with
+ $GNOME_LIBDIR to LIBSUPPORT in this case.
+
+ Gnome (gnome-libs) is now required to build libgtop,
+ added short comment to configure.in how to revert this
+ change.
+
+ * Makefile.am: removed `support' subdir.
+
+1998-06-03 Martin Baulig <baulig@merkur.uni-trier.de>
+
+ * libgtop.spec: New file.
+
+ * Makefile.am (EXTRA_DIST): Added `autogen.sh' and
+ `libgtop.spec'.
+
+ * configure.in (LIBGTOP_INCS): is now identically to
+ `LIBGTOP_GUILE_INCS'.
+
+ * include/glibtop/global.h: only including intl headers
+ while compiling libgtop.
+
1998-06-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
* src/server/main.c: #include <locale.h>
diff --git a/Makefile.am b/Makefile.am
index 94842009..8eccb23d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,13 +6,13 @@ endif
built_SUBDIRS = include sysdeps lib src
-SUBDIRS = po intl support macros $(built_SUBDIRS) $(examples_SUBDIRS)
+SUBDIRS = po intl macros $(built_SUBDIRS) $(examples_SUBDIRS)
-DIST_SUBDIRS = po intl support macros include sysdeps src lib examples
+DIST_SUBDIRS = po intl macros include sysdeps src lib examples
include_HEADERS = glibtop.h
-EXTRA_DIST = copyright.txt libgtopConf.sh.in
+EXTRA_DIST = autogen.sh libgtop.spec copyright.txt libgtopConf.sh.in
release:
$(MAKE) dist distdir=$(PACKAGE)$(VERSION)
diff --git a/acinclude.m4 b/acinclude.m4
index 85b32a5f..ba416daa 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -101,512 +101,86 @@ AC_DEFUN([AC_LC_SYSDEPS],[
AC_SUBST(libgtop_want_examples)
])
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated. We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
- case " <<$>>CONFIG_HEADERS " in
- *" <<$>>am_file "*<<)>>
- echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
- ;;
- esac
- am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-# Do all the work for Automake. This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
-#
-# Check to make sure that the build environment is sane.
+######################################################################
+# progtest.m4 from gettext 0.32
+######################################################################
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
- if test "[$]*" = "X"; then
- # -L didn't work.
- set X `ls -t $srcdir/configure conftestfile`
- fi
- if test "[$]*" != "X $srcdir/configure conftestfile" \
- && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "[$]2" = conftestfile
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf. Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
- $1=$2
- AC_MSG_RESULT(found)
-else
- $1="$3/missing $2"
- AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Add --enable-maintainer-mode option to configure.
-# From Jim Meyering
-
-# serial 1
-
-AC_DEFUN(AM_MAINTAINER_MODE,
-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
- dnl maintainer-mode is disabled by default
- AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- USE_MAINTAINER_MODE=$enableval,
- USE_MAINTAINER_MODE=no)
- AC_MSG_RESULT($USE_MAINTAINER_MODE)
- if test $USE_MAINTAINER_MODE = yes; then
- MAINT=
- else
- MAINT='#M#'
- fi
- AC_SUBST(MAINT)dnl
-]
-)
-
-# aclocal-include.m4
-#
-# This macro adds the name macrodir to the set of directories
-# that `aclocal' searches for macros.
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
# serial 1
-dnl AM_ACLOCAL_INCLUDE(macrodir)
-AC_DEFUN([AM_ACLOCAL_INCLUDE],
-[ACLOCAL="$ACLOCAL -I $1"])
-
-dnl
-dnl GNOME_CHECK_GUILE (failflag)
-dnl
-dnl if failflag is "fail" then GNOME_CHECK_GUILE will abort if guile is not found.
-dnl
-
-AC_DEFUN([GNOME_CHECK_GUILE],
-[
- saved_ldflags="$LDFLAGS"
- saved_cppflags="$CPPFLAGS"
- LDFLAGS="$LDFLAGS $GNOME_LIBDIR"
-
- AC_CHECK_LIB(qthreads,main,[
- QTTHREADS_LIB="-lqthreads"
- ],[
- AC_CHECK_LIB(qt, qt_null, QTTHREADS_LIB="-lqt")
- ],$LIBS)
- AC_SUBST(QTTHREADS_LIB)
-
- AC_CHECK_LIB(termcap,main,TERMCAP_LIB="-ltermcap")
- AC_CHECK_LIB(readline,main,READLINE_LIB="-lreadline",,$TERMCAP_LIB)
-
- AC_SUBST(TERMCAP_LIB)
- AC_SUBST(READLINE_LIB)
-
- AC_CHECK_PROG(BUILD_GUILE, build-guile, yes, no)
-
- if test "x$BUILD_GUILE" = "xyes"; then
- AC_MSG_CHECKING(whether build-guile works)
- if test x`build-guile --version >/dev/null 2>&1 || \
- echo no` = xno; then
- BUILD_GUILE=no
- fi
- AC_MSG_RESULT($BUILD_GUILE)
- fi
-
- AC_CHECK_LIB(m, sin)
-
- if test "x$BUILD_GUILE" = "xyes"; then
- AC_MSG_CHECKING(for guile libraries)
- GUILE_LIBS="-L`build-guile info libdir` `build-guile link`"
- AC_MSG_RESULT($GUILE_LIBS)
- AC_MSG_CHECKING(for guile headers)
- GUILE_INCS="-I`build-guile info includedir`"
- AC_MSG_RESULT($GUILE_INCS)
- else
- GUILE_LIBS="$GNOME_LIBDIR"
- GUILE_INCS="$GNOME_INCLUDEDIR"
- AC_CHECK_LIB(rx, main, GUILE_LIBS="-lrx $GUILE_LIBS")
- AC_CHECK_LIB(qt, main, GUILE_LIBS="-lqt $GUILE_LIBS")
- AC_CHECK_LIB(dl, dlopen, GUILE_LIBS="-ldl $GUILE_LIBS")
- GUILE_LIBS="-lguile $GUILE_LIBS $QTTHREADS_LIB $TERMCAP_LIB $READLINE_LIB"
- fi
-
- AC_SUBST(GUILE_LIBS)
- AC_SUBST(GUILE_INCS)
-
- LDFLAGS="$saved_ldflags $GUILE_LIBS"
- CPPFLAGS="$saved_cppflags $GUILE_INCS"
-
- AC_MSG_CHECKING(whether guile works)
- AC_TRY_LINK([
- #include <libguile.h>
- #include <guile/gh.h>
- ],[
- gh_eval_str("(newline)");
- scm_boot_guile(0,NULL,NULL,NULL);
- ],[
- ac_cv_guile_found=yes
- AC_DEFINE(HAVE_GUILE)
- ],[
- ac_cv_guile_found=no
- ])
- AC_MSG_RESULT($ac_cv_guile_found)
-
- if test x$ac_cv_guile_found = xno ; then
- if test x$1 = xfail ; then
- AC_MSG_ERROR(Can not find Guile 1.2 on this system)
- else
- AC_MSG_WARN(Can not find Guile 1.2 on this system)
- fi
- ac_cv_guile_found=no
- fi
-
- LDFLAGS="$saved_ldflags"
- CPPFLAGS="$saved_cppflags"
-
- AC_SUBST(GUILE_LIBS)
- AM_CONDITIONAL(GUILE, test x$ac_cv_guile_found = xyes)
-])
-
-# Define a conditional.
-
-AC_DEFUN(AM_CONDITIONAL,
-[AC_SUBST($1_TRUE)
-AC_SUBST($1_FALSE)
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi])
-
-
-dnl AM_PROG_LEX
-dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
-AC_DEFUN(AM_PROG_LEX,
-[AC_CHECK_PROGS(LEX, flex lex, "$1/missing flex")
-AC_PROG_LEX
-AC_DECL_YYTEXT])
-
-
-# serial 18 AM_PROG_LIBTOOL
-AC_DEFUN(AM_PROG_LIBTOOL,
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_RANLIB])
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AM_PROG_LD])
-AC_REQUIRE([AM_PROG_NM])
-AC_REQUIRE([AC_PROG_LN_S])
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)
-
-dnl Allow the --disable-shared flag to stop us from building shared libs.
-AC_ARG_ENABLE(shared,
-[ --enable-shared build shared libraries [default=yes]],
-[if test "$enableval" = no; then
- libtool_enable_shared=no
-else
- libtool_enable_shared=yes
-fi])
-test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
-libtool_shared=
-test "$enable_shared" = no && libtool_shared=" --disable-shared"
-
-dnl Allow the --disable-static flag to stop us from building static libs.
-AC_ARG_ENABLE(static,
-[ --enable-static build static libraries [default=yes]],
-[if test "$enableval" = no; then
- libtool_enable_static=no
-else
- libtool_enable_static=yes
-fi])
-test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
-libtool_static=
-test "$enable_static" = no && libtool_static=" --disable-static"
-
-libtool_flags="$libtool_shared$libtool_static"
-test "$silent" = yes && libtool_flags="$libtool_flags --silent"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-[case "$host" in
-*-*-irix6*)
- ac_save_CFLAGS="$CFLAGS"
- flag_passed=no
- for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do
- case "$f" in
- ABI)
- test -n "$SGI_ABI" && flag_passed=yes
- if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then
- # Choose the ABI flag according to GCC's specs.
- if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then
- LD="${LD-ld} -32"
- else
- LD="${LD-ld} -n32"
- fi
- fi
- ;;
-
- *)
- if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
- flag_passed=yes
- LD="${LD-ld} $f"
- fi
- ;;
- esac
- done
- CFLAGS="$ac_save_CFLAGS"
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- CFLAGS="$CFLAGS -belf"
- ;;
-esac]
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-])
-
-# AM_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AM_PROG_LD,
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])
-ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- ac_prog=`($CC -print-prog-name=ld) 2>&5`
- case "$ac_prog" in
- # Accept absolute paths.
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
/*)
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
*)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(ac_cv_path_LD,
-[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
fi
fi
done
IFS="$ac_save_ifs"
-else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$ac_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_SUBST(LD)
-AM_PROG_LD_GNU
+AC_SUBST($1)dnl
])
-AC_DEFUN(AM_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
-else
- ac_cv_prog_gnu_ld=no
-fi])
-])
-# AM_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AM_PROG_NM,
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
-[case "$NM" in
-/*)
- ac_cv_path_NM="$NM" # Let the user override the test with a path.
- ;;
-*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
- test -z "$ac_dir" && dir=.
- if test -f $ac_dir/nm; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1!d' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -B"
- elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$ac_dir/nm -p"
- else
- ac_cv_path_NM="$ac_dir/nm"
- fi
- break
+######################################################################
+# lcmessage.m4 from gettext 0.32
+######################################################################
+# Check whether LC_MESSAGES is available in <locale.h>.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+#
+# This file file be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AM_LC_MESSAGES,
+ [if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES)
fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
- ;;
-esac])
-NM="$ac_cv_path_NM"
-AC_MSG_RESULT([$NM])
-AC_SUBST(NM)
-])
+ fi])
-dnl LIBGTOP_SUPPORT_CHECKS
-dnl Check for various support functions needed by the standard
-dnl Gnome libraries. Sets LIBOBJS, might define some macros,
-dnl and will set the need_libgtop_support shell variable to "yes"
-dnl or "no". Also sets up the Automake BUILD_LIBGTOP_SUPPORT
-dnl conditional.
-AC_DEFUN([LIBGTOP_SUPPORT_CHECKS],[
- need_libgtop_support=no
- save_LIBOBJS="$LIBOBJS"
- LIBOBJS=
-
- AC_CACHE_CHECK([for program_invocation_short_name], libgtop_cv_short_name, [
- AC_TRY_LINK([#include <errno.h>],[
- char *foo = program_invocation_short_name],
- libgtop_cv_short_name=yes, libgtop_cv_short_name=no)])
- if test "$libgtop_cv_short_name" = yes; then
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
- fi
-
- AC_CACHE_CHECK([for program_invocation_name], libgtop_cv_invocation_name, [
- AC_TRY_LINK([#include <errno.h>],[
- char *foo = program_invocation_name],
- libgtop_cv_invocation_name=yes, libgtop_cv_invocation_name=no)])
- if test "$libgtop_cv_invocation_name" = yes; then
- AC_DEFINE(HAVE_PROGRAM_INVOCATION_NAME)
- fi
-
- AC_REPLACE_FUNCS(strtok_r strcasecmp strndup strnlen strerror)
-
- if test "$LIBOBJS" != ""; then
- need_libgtop_support=yes
- fi
- # Turn our LIBOBJS into libtool objects. This is gross, but it
- # requires changes to autoconf before it goes away.
- LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
- AC_SUBST(LTLIBOBJS)
-
- LIBOBJS="$save_LIBOBJS"
- AM_CONDITIONAL(BUILD_LIBGTOP_SUPPORT, test "$need_libgtop_support" = yes)
-])
+
+######################################################################
+# gettext.m4 from gettext 0.32
+######################################################################
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995.
#
@@ -915,72 +489,3 @@ __argz_count __argz_stringify __argz_next])
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
-
-# Search path for a program which passes the given test.
-# Ulrich Drepper <drepper@cygnus.com>, 1996.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN(AM_PATH_PROG_WITH_TEST,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test -n "[$]$1"; then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-# Ulrich Drepper <drepper@cygnus.com>, 1995.
-#
-# This file file be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 1
-
-AC_DEFUN(AM_LC_MESSAGES,
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES)
- fi
- fi])
-
diff --git a/configure.in b/configure.in
index ded551cc..3357499b 100644
--- a/configure.in
+++ b/configure.in
@@ -24,6 +24,9 @@ AC_CHECK_TOOL(NM,nm)
NM=`which $NM`
export CC CXX RANLIB LD AS AR NM
+dnl If you want to use libgtop without gnome, comment the following line out.
+GNOME_INIT
+
AC_LC_SYSDEPS
if test x$libgtop_want_guile = xyes ; then
@@ -60,7 +63,8 @@ AC_PROG_MAKE_SET
export cross_compiling
AM_PROG_LIBTOOL
-GNOME_SUPPORT_CHECKS
+dnl You need to uncomment the following line if you want to use libgtop without Gnome.
+dnl GNOME_SUPPORT_CHECKS
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -101,12 +105,24 @@ AC_SUBST(LDFLAGS)
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(GNOME_ENABLE_DEBUG),)
-LIBSUPPORT=
-SUPPORTINCS=
-if test "$need_gnome_support" = yes; then
- LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
- SUPPORTINCS='-I$(top_srcdir)/support'
+dnl If you want to use libgtop without gnome, uncomment the following paragraph:
+dnl LIBSUPPORT=
+dnl SUPPORTINCS=
+dnl if test "$need_gnome_support" = yes; then
+dnl LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
+dnl SUPPORTINCS='-I$(top_srcdir)/support'
+dnl fi
+dnl AC_SUBST(LIBSUPPORT)
+dnl AC_SUBST(SUPPORTINCS)
+
+dnl Some ugly hack; if '-lgnomesupport' is part of $GNOME_LIBS, we include it here.
+echo "$GNOME_LIBS" | grep -q -e '-lgnomesupport'
+if test $? = 0 ; then
+ LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
+ SUPPORTINCS="$GNOME_INCLUDEDIR"
fi
+AC_SUBST(LIBSUPPORT)
+AC_SUBST(SUPPORTINCS)
dnl These definitions are expanded in make.
LIBGTOP_LIBS='-L$(libdir)'
@@ -153,6 +169,7 @@ else
fi
if test "x$ac_cv_guile_found" = "xyes" ; then
+ LIBGTOP_INCS="$LIBGTOP_INCS $GUILE_INCS"
LIBGTOP_GUILE_INCS="$LIBGTOP_INCS $GUILE_INCS"
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS $GUILE_LIBS"
fi
@@ -168,9 +185,6 @@ AC_SUBST(LIBGTOP_GUILE_INCS)
AC_SUBST(LIBGTOP_BINDIR)
AC_SUBST(LIBGTOP_SERVER)
-AC_SUBST(LIBSUPPORT)
-AC_SUBST(SUPPORTINCS)
-
AC_OUTPUT([
Makefile
po/Makefile.in
@@ -191,5 +205,4 @@ src/server/Makefile
src/proxy/Makefile
lib/Makefile
examples/Makefile
-support/Makefile
macros/Makefile],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
diff --git a/include/glibtop/global.h b/include/glibtop/global.h
index d1609f35..9cbaed8b 100644
--- a/include/glibtop/global.h
+++ b/include/glibtop/global.h
@@ -55,11 +55,13 @@
#include <guile/gh.h>
#endif
+#ifdef _IN_LIBGTOP
#if (defined HAVE_LIBINTL_H) || (defined HAVE_GETTEXT)
#include <libintl.h>
#else
#include <libgettext.h>
#endif
+#endif
#include <stdio.h>
#include <stdlib.h>