2003-05-10 Danilo Šegan <dsegan@gmx.net> * configure.in: Added "sr" and "sr@Latn" to ALL_LINGUAS. * po/sr.po, po/sr@Latn.po: Added Serbian translation by Serbian team (Prevod.org).
265 lines
7.3 KiB
Plaintext
265 lines
7.3 KiB
Plaintext
dnl
|
|
dnl Configure script for LibGTop
|
|
dnl
|
|
|
|
AC_INIT(copyright.txt)
|
|
AM_CONFIG_HEADER(config.h)
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
if test -z "$I_LIKE_PAIN"; then
|
|
AC_MSG_ERROR([
|
|
*** You don't want this version of libgtop!
|
|
*** If you want the GNOME 2.0 port then check out
|
|
*** the libgtop-GNOME-2-0-port branch of libgtop
|
|
*** You can do this by typing
|
|
*** cvs update -r libgtop-GNOME-2-0-port libgtop/
|
|
*** in the directory above this one.
|
|
*** If you are looking for the stable branch then
|
|
*** check out the LIBGTOP_STABLE_1_0 branch
|
|
***])
|
|
fi
|
|
|
|
dnl This is required at several places
|
|
AC_CHECK_PROG(ac_dc_found, dc, yes, no)
|
|
if test x$ac_dc_found != xyes ; then
|
|
AC_MSG_ERROR([
|
|
*** The "dc" utility was not found on your system.
|
|
***
|
|
*** When using RedHat Linux, you need to install the "bc" package.
|
|
***
|
|
*** It is now part of the "bc" package, so you should look at
|
|
*** ftp://ftp.gnu.org/pub/gnu/bc/ if you want to compile it yourself.
|
|
***
|
|
*** Other systems and distributions may also have it in their "bc" package,
|
|
*** so if there's no "dc" one, please look for "bc".
|
|
***])
|
|
fi
|
|
|
|
. $srcdir/LIBGTOP-VERSION
|
|
AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
|
|
|
|
AC_SUBST(LIBGTOP_MAJOR_VERSION)
|
|
AC_SUBST(LIBGTOP_MINOR_VERSION)
|
|
AC_SUBST(LIBGTOP_MICRO_VERSION)
|
|
AC_SUBST(LIBGTOP_INTERFACE_AGE)
|
|
AC_SUBST(LIBGTOP_BINARY_AGE)
|
|
AC_SUBST(LIBGTOP_VERSION)
|
|
AC_SUBST(LIBGTOP_VERSION_CODE)
|
|
AC_SUBST(LIBGTOP_VERSION_SUFFIX)
|
|
|
|
AC_SUBST(LIBGTOP_PACKAGE)
|
|
AC_DEFINE_UNQUOTED(LIBGTOP_PACKAGE, "$LIBGTOP_PACKAGE")
|
|
|
|
# libtool versioning
|
|
LT_RELEASE=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION
|
|
LT_CURRENT=`expr $LIBGTOP_MICRO_VERSION - $LIBGTOP_INTERFACE_AGE`
|
|
LT_REVISION=$LIBGTOP_INTERFACE_AGE
|
|
LT_AGE=`expr $LIBGTOP_BINARY_AGE - $LIBGTOP_INTERFACE_AGE`
|
|
LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE} -release ${LT_RELEASE}'
|
|
AC_SUBST(LT_VERSION_INFO)
|
|
AC_SUBST(LT_RELEASE)
|
|
AC_SUBST(LT_CURRENT)
|
|
AC_SUBST(LT_REVISION)
|
|
AC_SUBST(LT_AGE)
|
|
|
|
GNOME_COMMON_INIT
|
|
GNOME_PLATFORM_GNOME_2(yes, force)
|
|
|
|
AC_ISC_POSIX
|
|
AC_PROG_CC
|
|
AC_STDC_HEADERS
|
|
AC_ARG_PROGRAM
|
|
|
|
dnl We need this at some places.
|
|
libgtop_top_builddir=`pwd`
|
|
AC_SUBST(libgtop_top_builddir)
|
|
|
|
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 Most people should have a working perl interpreter on their system
|
|
AC_CHECK_PROGS(PERL, perl5 perl)
|
|
test -z "$PERL" && AC_MSG_ERROR([You need to have a working perl interpreter.])
|
|
|
|
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
|
|
|
|
AC_LIBTOOL_DLOPEN
|
|
AM_PROG_LIBTOOL
|
|
|
|
dnl Let the user enable compiler warnings
|
|
GNOME_COMPILE_WARNINGS
|
|
|
|
dnl PKGCONFIG_CHECK_MODULES(GNOMESUPPORT, libgnomesupport-2.0:1.96.0)
|
|
dnl AC_SUBST(GNOMESUPPORT_CFLAGS)
|
|
dnl AC_SUBST(GNOMESUPPORT_LIBS)
|
|
|
|
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
|
|
PKG_CHECK_MODULES(XML, libxml-2.0 >= 2.2.8)
|
|
AC_SUBST(XML_CFLAGS)
|
|
AC_SUBST(XML_LIBS)
|
|
|
|
AC_ARG_WITH(libgtop-inodedb,
|
|
[ --with-libgtop-inodedb Build the inodedb stuff (default=no)],
|
|
[build_inodedb="$withval"], [build_inodedb=no])
|
|
|
|
LIBGTOP_EXTRA_LIBS=
|
|
if test x$build_inodedb = xyes ; then
|
|
AC_CHECK_LIB(gdbm, gdbm_open, LIBGTOP_EXTRA_LIBS='-lgdbm', build_inodedb=no)
|
|
fi
|
|
|
|
AM_CONDITIONAL(INODEDB, test x$build_inodedb = xyes)
|
|
|
|
if test x$build_inodedb = xyes ; then
|
|
AC_DEFINE(GLIBTOP_INODEDB)
|
|
fi
|
|
|
|
AM_CONDITIONAL(ENABLE_STATIC, test x$enable_static = xyes)
|
|
AM_CONDITIONAL(ENABLE_SHARED, test x$enable_static = xyes)
|
|
|
|
AM_PROG_LIBTOOL
|
|
|
|
dnl Check for glib
|
|
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.1 gmodule-2.0 >= 1.3.1 gobject-2.0 >= 1.3.1)
|
|
AC_SUBST(GLIB_CFLAGS)
|
|
AC_SUBST(GLIB_LIBS)
|
|
|
|
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 Check for Internet sockets.
|
|
AC_CHECK_FUNC(socket,
|
|
[AC_CHECK_HEADER(netinet/in.h,
|
|
[AC_CHECK_HEADER(arpa/inet.h, [
|
|
AC_DEFINE(HAVE_SOCKETS)
|
|
AC_MSG_CHECKING("for sun_len member in struct sockaddr_un")
|
|
AC_TRY_LINK([
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/un.h>
|
|
],
|
|
[static struct sockaddr_un x; x.sun_len = 1;],
|
|
[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
|
|
[AC_MSG_RESULT(no)])])])])
|
|
|
|
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)
|
|
|
|
dnl ## all 'es_??' are only needed for format numbers different of 'es'
|
|
ALL_LINGUAS="am az bg ca da de el es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fa fi fr ga gl hu id it ja ko ml mn nl nn no pl pt pt_BR ro ru sk sl sr sr@Latn sv tr uk vi zh_CN zh_TW"
|
|
AM_GNOME2_GETTEXT
|
|
|
|
AC_PATH_XTRA
|
|
|
|
dnl For diskusage stuff
|
|
GNOME_FILEUTILS_CHECKS
|
|
|
|
dnl Debugging
|
|
AC_ARG_ENABLE(debug, [ --enable-debug turn on debugging [default=no]], libgtop_enable_debug=yes, libgtop_enable_debug=no)
|
|
AC_ARG_ENABLE(fatal-warnings, [ --enable-fatal-warnings make all warnings fatal [debug=no]],AC_DEFINE(LIBGTOP_FATAL_WARNINGS),)
|
|
AC_ARG_ENABLE(glib-malloc, [ --enable-glib-malloc use glib's malloc [default=auto]], libgtop_enable_glib_malloc=yes,)
|
|
|
|
if test "x$libgtop_enable_glib_malloc" != xyes ; then
|
|
if test "x$libgtop_enable_debug" = xyes ; then
|
|
libgtop_enable_glib_malloc=yes
|
|
else
|
|
libgtop_enable_glib_malloc=no
|
|
fi
|
|
fi
|
|
|
|
if test "x$libgtop_enable_glib_malloc" = xyes ; then
|
|
AC_DEFINE(LIBGTOP_USE_GLIB_MALLOC)
|
|
fi
|
|
|
|
if test "x$libgtop_enable_debug" = xyes ; then
|
|
AC_DEFINE(LIBGTOP_ENABLE_DEBUG)
|
|
fi
|
|
|
|
dnl These definitions are expanded in make.
|
|
LIBGTOP_LIBS='-L$(libdir)'
|
|
LIBGTOP_INCS='-I$(includedir) -I$(pkglibdir)/include'
|
|
|
|
if test x$build_inodedb = xyes ; then
|
|
LIBGTOP_INCS="$LIBGTOP_INCS -DGLIBTOP_INODEDB"
|
|
fi
|
|
|
|
LIBGTOP_INCS="$LIBGTOP_INCS $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS"
|
|
|
|
LIBGTOP_EXTRA_LIBS="$LIBGTOP_EXTRA_LIBS $GLIB_LIBS $XML_LIBS"
|
|
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS -lgtop_common -lgtop"
|
|
|
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_LIBS -lgtop_names"
|
|
|
|
LIBGTOP_LIBS="$LIBGTOP_LIBS"
|
|
LIBGTOP_NAMES_LIBS="$LIBGTOP_NAMES_LIBS"
|
|
|
|
LIBGTOP_NAMES_INCS="$LIBGTOP_INCS -DGLIBTOP_NAMES"
|
|
|
|
machine_incs="-I\$(top_srcdir)/sysdeps/$sysdeps_dir"
|
|
|
|
AC_SUBST(machine_incs)
|
|
|
|
LIBGTOP_BACKEND_DIR="\$(datadir)/libgtop/backends"
|
|
|
|
INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -Werror -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/intl $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_BACKEND_DIR=\"'"$LIBGTOP_BACKEND_DIR"'\"'
|
|
|
|
AC_SUBST(INCLUDES)
|
|
|
|
AC_SUBST(LIBGTOP_EXTRA_LIBS)
|
|
AC_SUBST(LIBGTOP_BACKEND_DIR)
|
|
|
|
AC_SUBST(LIBGTOP_LIBS)
|
|
AC_SUBST(LIBGTOP_INCS)
|
|
AC_SUBST(LIBGTOP_NAMES_LIBS)
|
|
AC_SUBST(LIBGTOP_NAMES_INCS)
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
po/Makefile.in
|
|
intl/Makefile
|
|
misc/Makefile
|
|
include/Makefile
|
|
include/glibtop/Makefile
|
|
sysdeps/Makefile
|
|
sysdeps/common/Makefile
|
|
sysdeps/names/Makefile
|
|
src/Makefile
|
|
src/inodedb/Makefile
|
|
scripts/Makefile
|
|
backends/Makefile
|
|
backends/server/Makefile
|
|
backends/sysdeps/Makefile
|
|
backends/common/Makefile
|
|
lib/Makefile
|
|
doc/Makefile
|
|
dtd/Makefile
|
|
libgtop-2.0.pc])
|