1998-06-14 Martin Baulig <martin@home-of-linux.org> * include/glibtop/gnuserv.h: New file. Imported from xemacs 20.3. * sysdeps/common/gnuslib.c: New file. Imported from xemacs 20.3 * lib/gnuclient.c: New file. Imported from xemacs 20.3 * sysdeps/daemon/gnuserv.c: New file. Imported from xemacs 20.3 * sysdeps/daemon: New directory. * configure.in (LIBGTOP_LIBS, LIBGTOP_GUILE_LIBS): Added `$X_LIBS -lXau' when we have xauth.
253 lines
5.9 KiB
Plaintext
253 lines
5.9 KiB
Plaintext
dnl
|
|
Mnl Configure script for the Gnome library
|
|
dnl
|
|
|
|
AC_INIT(copyright.txt)
|
|
AM_CONFIG_HEADER(config.h)
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AM_INIT_AUTOMAKE(libgtop, 0.01)
|
|
|
|
AM_ACLOCAL_INCLUDE(macros)
|
|
|
|
AC_ISC_POSIX
|
|
AC_PROG_CC
|
|
AC_STDC_HEADERS
|
|
AC_ARG_PROGRAM
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_CHECK_TOOL(CC,gcc)
|
|
AC_CHECK_TOOL(RANLIB,ranlib)
|
|
AC_CHECK_TOOL(AS,as)
|
|
AC_CHECK_TOOL(AR,ar)
|
|
AC_CHECK_TOOL(NM,nm)
|
|
|
|
NM=`which $NM`
|
|
export CC CXX RANLIB LD AS AR NM
|
|
|
|
AC_PROG_INSTALL
|
|
AC_PROG_LN_S
|
|
AC_PROG_MAKE_SET
|
|
|
|
export cross_compiling
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
dnl If you want to use libgtop without gnome, comment the following line out.
|
|
GNOME_INIT_HOOK(gnome_found=yes)
|
|
|
|
if test "x$gnome_found" != xyes; then
|
|
GNOME_SUPPORT_CHECKS
|
|
else
|
|
AM_CONDITIONAL(BUILD_GNOME_SUPPORT, false)
|
|
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
fi
|
|
|
|
AC_LC_SYSDEPS
|
|
|
|
if test x$libgtop_want_guile = xyes ; then
|
|
GNOME_CHECK_GUILE
|
|
if test x$ac_cv_guile_found = xyes ; then
|
|
if test x$libgtop_want_names = xyes ; then
|
|
AC_DEFINE(GLIBTOP_GUILE_NAMES)
|
|
fi
|
|
guile_examples='third third_static'
|
|
guile_subdirs='guile'
|
|
else
|
|
guile_examples=
|
|
guile_subdirs=
|
|
fi
|
|
else
|
|
guile_examples=
|
|
guile_subdirs=
|
|
fi
|
|
|
|
AC_SUBST(guile_examples)
|
|
AC_SUBST(guile_subdirs)
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
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
|
|
AC_C_INLINE
|
|
AC_TYPE_OFF_T
|
|
AC_TYPE_PID_T
|
|
AC_TYPE_SIZE_T
|
|
AC_STRUCT_ST_RDEV
|
|
AC_HEADER_TIME
|
|
AC_STRUCT_TM
|
|
AC_TYPE_UID_T
|
|
|
|
dnl For SunOS
|
|
AC_CHECK_TYPE(ssize_t, int)
|
|
AC_CHECK_HEADERS(memory.h)
|
|
AC_CHECK_HEADERS(string.h strings.h, break)
|
|
AC_REPLACE_FUNCS(strerror)
|
|
AC_CHECK_LIB(kvm, kvm_open)
|
|
|
|
dnl For DEC OSF1
|
|
AC_CHECK_LIB(mach, vm_statistics)
|
|
|
|
dnl Checks for library functions.
|
|
AC_FUNC_ALLOCA
|
|
AC_FUNC_MMAP
|
|
AC_TYPE_SIGNAL
|
|
AC_FUNC_STRFTIME
|
|
AC_CHECK_FUNCS(getcwd gettimeofday getwd putenv strdup strtoul uname)
|
|
|
|
ALL_LINGUAS="fr"
|
|
AM_GNU_GETTEXT
|
|
|
|
AC_PATH_XTRA
|
|
|
|
dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
|
|
dnl So we use the following instead.
|
|
dnl XE_SPACE(var, words)
|
|
define([XE_SPACE],[
|
|
T=""
|
|
for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
|
|
$1="$T"
|
|
])dnl
|
|
|
|
dnl Autodetect Xauth
|
|
dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
|
|
test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
|
|
test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) }
|
|
test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no, $X_LIBS) }
|
|
test -z "$with_xauth" && with_xauth=yes
|
|
if test "$with_xauth" = "yes"; then
|
|
AC_DEFINE(HAVE_XAUTH)
|
|
XE_SPACE(libs_xauth, $X_LIBS -lXau)
|
|
fi
|
|
AC_SUBST(libs_xauth)
|
|
|
|
|
|
CFLAGS="$CFLAGS -D_IN_LIBGTOP"
|
|
|
|
AC_SUBST(CFLAGS)
|
|
AC_SUBST(CPPFLAGS)
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]],AC_DEFINE(GNOME_ENABLE_DEBUG),)
|
|
|
|
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)'
|
|
LIBGTOP_INCS='-I$(includedir)'
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_LIBS"
|
|
LIBGTOP_GUILE_INCS="$LIBGTOP_INCS"
|
|
LIBGTOP_BINDIR='$(bindir)'
|
|
LIBGTOP_SERVER='$(bindir)/gtop_server'
|
|
|
|
sysdeps_dir="$libgtop_sysdeps_dir"
|
|
AC_SUBST(sysdeps_dir)
|
|
|
|
if test x$ac_cv_guile_found = xyes ; then
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile"
|
|
libgtop_guile_found=yes
|
|
else
|
|
libgtop_guile_found=no
|
|
fi
|
|
|
|
AC_SUBST(libgtop_guile_found)
|
|
|
|
if test x$libgtop_want_names = xyes ; then
|
|
if test x$ac_cv_guile_found = xyes ; then
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_guile_names"
|
|
libgtop_want_guile_names=yes
|
|
else
|
|
libgtop_want_guile_names=no
|
|
fi
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_names"
|
|
fi
|
|
|
|
AC_SUBST(libgtop_want_guile_names)
|
|
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common $ibs_xauth"
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_common $libs_xauth"
|
|
|
|
if test "x$need_server" = "xyes" ; then
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop"
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop"
|
|
else
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_sysdeps"
|
|
LIBGTOP_GUILE_LIBS="$LIBGTOP_GUILE_LIBS -lgtop_sysdeps"
|
|
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
|
|
|
|
machine_incs='-I$(top_srcdir)/sysdeps/@sysdeps_dir@'
|
|
|
|
AC_SUBST(machine_incs)
|
|
|
|
AC_SUBST(LIBGTOP_LIBS)
|
|
AC_SUBST(LIBGTOP_INCS)
|
|
AC_SUBST(LIBGTOP_GUILE_LIBS)
|
|
AC_SUBST(LIBGTOP_GUILE_INCS)
|
|
AC_SUBST(LIBGTOP_BINDIR)
|
|
AC_SUBST(LIBGTOP_SERVER)
|
|
|
|
LIBSUPPORT=
|
|
SUPPORTINCS=
|
|
if test "$need_gnome_support" = yes; then
|
|
if test "x$gnome_found" = xyes ; then
|
|
LIBSUPPORT="$GNOME_LIBDIR -lgnomesupport"
|
|
SUPPORTINCS="$GNOME_INCLUDEDIR"
|
|
else
|
|
LIBSUPPORT='$(top_builddir)/support/libgnomesupport.la'
|
|
SUPPORTINCS='-DNEED_GNOMESUPPORT_H -I$(top_builddir)/support -I$(top_srcdir)/support'
|
|
fi
|
|
fi
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
po/Makefile.in
|
|
intl/Makefile
|
|
include/Makefile
|
|
include/glibtop/Makefile
|
|
sysdeps/Makefile
|
|
sysdeps/common/Makefile
|
|
sysdeps/names/Makefile
|
|
sysdeps/guile/Makefile
|
|
sysdeps/guile/names/Makefile
|
|
sysdeps/stub/Makefile
|
|
sysdeps/sun4/Makefile
|
|
sysdeps/osf1/Makefile
|
|
sysdeps/linux/Makefile
|
|
sysdeps/kernel/Makefile
|
|
src/Makefile
|
|
src/server/Makefile
|
|
src/proxy/Makefile
|
|
src/daemon/Makefile
|
|
lib/Makefile
|
|
examples/Makefile
|
|
support/Makefile
|
|
macros/Makefile],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
|