Browse Source

Update to use XDT. Yay Benedikt.

(Old svn revision: 4312)
upstream/xfce4-panel-4.10.1
Jasper Huijsmans 18 years ago
parent
commit
ca9b69ceef
  1. 2
      Makefile.am
  2. 2
      autoclean.sh
  3. 170
      autogen.sh
  4. 50
      configure.ac
  5. 122
      m4/X11.m4
  6. 101
      m4/debug.m4
  7. 80
      m4/depends.m4
  8. 380
      m4/glib-gettext.m4
  9. 27
      m4/i18n.m4
  10. 57
      m4/pkg.m4
  11. 69
      mkinstalldirs
  12. 12
      panel/xfce_support.c
  13. 28
      plugins/launcher/launcher.c
  14. 244
      po/Makefile.in.in

2
Makefile.am

@ -36,8 +36,6 @@ rpm: dist
html: Makefile
make -C doc html
ACLOCAL_AMFLAGS = -I m4
dist-bz2: dist
zcat $(PACKAGE)-$(VERSION).tar.gz | bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2

2
autoclean.sh

@ -6,6 +6,6 @@ echo -n "Cleaning generated files..."
rm -f config.* configure aclocal.m4
rm -f compile depcomp ltmain.sh missing install-sh
rm -f po/*.gmo
rm -f $(find -name Makefile.in)
rm -f $(find -name Makefile.in) po/Makefile.in.in
echo "done."

170
autogen.sh

@ -1,155 +1,23 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltool' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
(xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml-i18n-toolize' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AC_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
}
(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`glib' installed."
echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
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 "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
if test "$DIE" -eq 1; then
#
# $Id$
#
# Copyright (c) 2002-2005
# The Xfce development team. All rights reserved.
#
# Written for Xfce by Benedikt Meurer <benny@xfce.org>.
#
(type xdt-autogen) >/dev/null 2>&1 || {
cat >&2 <<EOF
autogen.sh: You don't seem to have the Xfce development tools installed on
your system, which are required to build this software.
Please install the xfce4-dev-tools package first, it is available
from http://www.xfce.org/.
EOF
exit 1
fi
if test -z "$*"; then
echo "**Message**: I am going to add --enable-maintainer-mode to \`configure'."
echo "If you wish to pass any other to it, please specify them on the"
echo \`$0\'" command line."
echo
conf_flags="--enable-maintainer-mode"
else
unset conf_flags
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
}
if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
echo "Running xml-i18n-toolize..."
xml-i18n-toolize --copy --force --automake
fi
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --foreign $am_opt ..."
automake --add-missing --foreign --force --copy $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
exec xdt-autogen $@
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi
# vi:set ts=2 sw=2 et ai:

50
configure.ac

@ -5,14 +5,22 @@ dnl
dnl 2003 Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de>
dnl
dnl version info
m4_define([xfce4_panel_version],[4.3.2])
m4_define([libxfce4panel_verinfo], [1:0:0])
AC_INIT([panel/main.c])
dnl init autoconf
AC_COPYRIGHT([Copyright (c) 2002-2005
The Xfce development team. All rights reserved.
AM_INIT_AUTOMAKE([xfce4-panel], [4.3.2])
Written for Xfce by Jasper Huijsmans <jasper@xfce.org>.])
AC_INIT([xfce4-panel], [xfce4_panel_version()], [xfce4-dev@xfce.org])
AC_PREREQ([2.50])
dnl init automake
XFCE4_PANEL_VERSION=xfce4_panel_version()
AM_INIT_AUTOMAKE([xfce4-panel], [$XFCE4_PANEL_VERSION])
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE
dnl Check for UNIX variants
@ -39,34 +47,28 @@ AC_CHECK_HEADERS([signal.h stddef.h sys/wait.h time.h netinet/in.h])
AC_CHECK_FUNCS([sigaction])
dnl Check for i18n support
BM_I18N([xfce4-panel], [ar az be bg ca cs de en_GB es es_MX et eu fa fr fi
gu he hi hu it ja lt ms nl ko nb_NO pa pl pt_BR
pt_PT ro ru sv sk ta tr uk vi zh_CN zh_TW])
XDT_I18N([ar az be bg ca cs de en_GB es es_MX et eu fa fr fi gu he hi hu it \
ja lt ms nl ko nb_NO pa pl pt_BR pt_PT ro ru sv sk ta tr uk vi \
zh_CN zh_TW])
dnl Check for X11 installed
BM_LIBX11_REQUIRE
XDT_CHECK_LIBX11_REQUIRE
XDT_CHECK_LIBSM
dnl Check for required packages
BM_DEPEND([LIBXFCE4MCS_CLIENT], [libxfce4mcs-client-1.0], [4.2.0])
BM_DEPEND([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
BM_DEPEND([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
BM_DEPEND([LIBXML], [libxml-2.0], [2.4.0])
dnl disable threading, too much trouble for too little gain
dnl BM_DEPEND([GTHREAD], [gthread-2.0], [2.0.6])
XDT_CHECK_PACKAGE([LIBXFCE4MCS_CLIENT], [libxfce4mcs-client-1.0], [4.2.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.2.0])
XDT_CHECK_PACKAGE([LIBXFCEGUI4], [libxfcegui4-1.0], [4.2.0])
XDT_CHECK_PACKAGE([LIBXML], [libxml-2.0], [2.4.0])
dnl Check for dbh installed for completion combo
dnl disable for now, doesn't work for new install, only after
dnl combo has been used in xffm or xfrun.
dnl BM_DEPEND_CHECK([LIBDBH], [dbh-1.0], [1.0],
dnl [dbh], [DBH library], [yes])
dnl Check for optional packages
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
[libstartup-notification-1.0], [0.5],
[startup-notification],
[startup notification library], [yes])
dnl Configure the mcs plugin
XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [4.2.0])
dnl Check for optional packages
BM_DEPEND_CHECK([LIBSTARTUP_NOTIFICATION], [libstartup-notification-1.0],
[0.5], [startup-notification], [startup notification library], [yes])
XDT_XFCE_MCS_PLUGIN([XFCE_MCS_MANAGER], [4.2.0])
dnl Check for debugging support
BM_DEBUG_SUPPORT

122
m4/X11.m4

@ -1,122 +0,0 @@
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
dnl Check for X11
AC_DEFUN([BM_LIBX11],
[
AC_REQUIRE([AC_PATH_XTRA])
LIBX11_CFLAGS= LIBX11_LDFLAGS= LIBX11_LIBS=
if test "$no_x" != "yes"; then
AC_CHECK_LIB(X11, main,
[
AC_DEFINE(HAVE_LIBX11, 1, Define if libX11 is available)
LIBX11_CFLAGS="$X_CFLAGS"
for option in $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS; do
case "$option" in
-L*)
path=`echo $option | sed 's/^-L//'`
if test x"$path" != x""; then
LIBX11_LDFLAGS="$LIBX11_LDFLAGS -L$path"
fi
;;
*)
LIBX11_LIBS="$LIBX11_LIBS $option"
;;
esac
done
if ! echo $LIBX11_LIBS | grep -- '-lX11' > /dev/null; then
LIBX11_LIBS="$LIBX11_LIBS -lX11"
fi
], [], [$X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS])
fi
AC_SUBST(LIBX11_CFLAGS)
AC_SUBST(LIBX11_LDFLAGS)
AC_SUBST(LIBX11_LIBS)
])
AC_DEFUN([BM_LIBX11_REQUIRE],
[
AC_REQUIRE([BM_LIBX11])
if test "$no_x" = "yes"; then
AC_MSG_ERROR([X Window system libraries and header files are required])
fi
])
AC_DEFUN([BM_LIBSM],
[
AC_REQUIRE([BM_LIBX11])
LIBSM_CFLAGS= LIBSM_LDFLAGS= LIBSM_LIBS=
if test "$no_x" != "yes"; then
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
[
AC_DEFINE(HAVE_LIBSM, 1, Define if libSM is available)
LIBSM_CFLAGS="$LIBX11_CFLAGS"
LIBSM_LDFLAGS="$LIBX11_LDFLAGS"
LIBSM_LIBS="$LIBX11_LIBS"
if ! echo $LIBSM_LIBS | grep -- '-lSM' > /dev/null; then
LIBSM_LIBS="$LIBSM_LIBS -lSM -lICE"
fi
], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lICE])
fi
AC_SUBST(LIBSM_CFLAGS)
AC_SUBST(LIBSM_LDFLAGS)
AC_SUBST(LIBSM_LIBS)
])
AC_DEFUN([BM_LIBXPM],
[
AC_REQUIRE([BM_LIBX11])
LIBXPM_CFLAGS= LIBXPM_LDFLAGS= LIBXPM_LIBS=
if test "$no_x" != "yes"; then
AC_CHECK_LIB(Xpm, main,
[
AC_DEFINE([HAVE_LIBXPM], [1], [Define if libXpm is available])
LIBXPM_CFLAGS="$LIBX11_CFLAGS"
LIBXPM_LDFLAGS="$LIBX11_LDFLAGS"
LIBXPM_LIBS="$LIBX11_LIBS"
if ! echo $LIBXPM_LIBS | grep -- '-lXpm' > /dev/null; then
LIBXPM_LIBS="$LIBXPM_LIBS -lXpm"
fi
], [], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXpm])
fi
AC_SUBST([LIBXPM_CFLAGS])
AC_SUBST([LIBXPM_LDFLAGS])
AC_SUBST([LIBXPM_LIBS])
])
AC_DEFUN([BM_LIBXPM_REQUIRE],
[
AC_REQUIRE([BM_LIBX11_REQUIRE])
AC_REQUIRE([BM_LIBXPM])
if test -z "$LIBXPM_LIBS"; then
AC_MSG_ERROR([The Xpm library was not found on you system])
fi
])
AC_DEFUN([BM_LIBXINERAMA],
[
AC_ARG_ENABLE(xinerama,
AC_HELP_STRING([--enable-xinerama], [enable xinerama extension])
AC_HELP_STRING([--disable-xinerama], [disable xinerama extension [default]]),
[], [enable_xinerama=no])
LIBXINERAMA_CFLAGS= LIBXINERAMA_LDFLAGS= LIBXINERAMA_LIBS=
if test "x$enable_xinerama" = "xyes"; then
AC_REQUIRE([BM_LIBX11_REQUIRE])
AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
[
AC_DEFINE(HAVE_LIBXINERAMA, 1, Define if XFree86 Xinerama is available)
LIBXINERAMA_CFLAGS="$LIBX11_CFLAGS"
LIBXINERAMA_LDFLAGS="$LIBX11_LDFLAGS"
LIBXINERAMA_LIBS="$LIBX11_LIBS"
if ! echo $LIBXINERAMA_LIBS | grep -- '-lXinerama' > /dev/null; then
LIBXINERAMA_LIBS="$LIBXINERAMA_LIBS -lXinerama"
fi
if ! echo $LIBXINERAMA_LIBS | grep -- '-lXext' > /dev/null; then
LIBXINERAMA_LIBS="$LIBXINERAMA_LIBS -lXext"
fi
],[], [$LIBX11_CFLAGS $LIBX11_LDFLAGS $LIBX11_LIBS -lXext])
fi
AC_SUBST(LIBXINERAMA_CFLAGS)
AC_SUBST(LIBXINERAMA_LDFLAGS)
AC_SUBST(LIBXINERAMA_LIBS)
])

101
m4/debug.m4

@ -1,101 +0,0 @@
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
dnl
dnl if debug support is requested:
dnl
dnl 1) defines DEBUG to 1
dnl 2) adds requested debug level flags to CFLAGS
dnl
AC_DEFUN([BM_DEBUG_SUPPORT],
[
dnl # --enable-debug
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug[=yes|no|full]], [Build with debugging support])
AC_HELP_STRING([--disable-debug], [Include no debugging support [default]]),
[], [enable_debug=no])
AC_MSG_CHECKING([whether to build with debugging support])
if test x"$enable_debug" != x"no"; then
AC_DEFINE(DEBUG, 1, Define for debugging support)
if test x"$enable_debug" = x"full"; then
AC_DEFINE(DEBUG_TRACE, 1, Define for tracing support)
CFLAGS="$CFLAGS -g3 -Wall -Werror -DXFCE_DISABLE_DEPRECATED"
AC_MSG_RESULT([full])
else
CFLAGS="$CFLAGS -g -Wall -DXFCE_DISABLE_DEPRECATED"
AC_MSG_RESULT([yes])
fi
else
AC_MSG_RESULT([no])
fi
dnl # --enable-profiling
AC_ARG_ENABLE([profiling],
AC_HELP_STRING([--enable-profiling],
[Generate extra code to write profile information])
AC_HELP_STRING([--disable-profiling],
[No extra code for profiling (default)]),
[], [enable_profiling=no])
AC_MSG_CHECKING([whether to build with profiling support])
if test x"$enable_profiling" != x"no"; then
CFLAGS="$CFLAGS -pg"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl # --enable-gcov
AC_ARG_ENABLE([gcov],
AC_HELP_STRING([--enable-gcov],
[compile with coverage profiling instrumentation (gcc only)])
AC_HELP_STRING([--disable-gcov],
[do not generate coverage profiling instrumentation (default)]),
[], [enable_gcov=no])
AC_MSG_CHECKING([whether to compile with coverage profiling instrumentation])
if test x"$enable_gcov" != x"no"; then
CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl # --enable-final
AC_REQUIRE([AC_PROG_LD])
AC_ARG_ENABLE([final],
AC_HELP_STRING([--enable-final], [Build final version]),
[], [enable_final=no])
AC_MSG_CHECKING([whether to build final version])
if test x"$enable_final" = x"yes"; then
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
else
AC_MSG_RESULT([no])
fi
dnl # --enable-asserts
AC_ARG_ENABLE([asserts],
AC_HELP_STRING([--enable-asserts], [Enable assert statements (default)])
AC_HELP_STRING([--disable-asserts],
[Disable assert statements (USE WITH CARE!!!)]),
[], [enable_asserts=yes])
AC_MSG_CHECKING([whether to enable assert statements])
if test x"$enable_asserts" != x"yes"; then
CFLAGS="$CFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
])

80
m4/depends.m4

@ -1,80 +0,0 @@
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
dnl
dnl
AC_DEFUN([BM_DEPEND],
[
PKG_CHECK_MODULES([$1], [$2 >= $3])
$1_REQUIRED_VERSION=$3
AC_SUBST($1_REQUIRED_VERSION)
])
dnl
dnl BM_DEPEND_CHECK(var, pkg, version, name, helpstring, default)
dnl
AC_DEFUN([BM_DEPEND_CHECK],
[
AC_ARG_ENABLE([$4],
AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=$6)])
AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
[ac_cv_$1_check=$enableval], [ac_cv_$1_check=$6])
if test x"$ac_cv_$1_check" = x"yes"; then
AC_MSG_CHECKING([for $2 >= $3])
if $PKG_CONFIG --atleast-version=$3 $2 2> /dev/null; then
AC_MSG_RESULT([yes])
BM_DEPEND([$1], [$2], [$3])
AC_DEFINE([HAVE_$1], [1], [Define if you have $2 >= $3])
$1_FOUND="yes"
else
AC_MSG_RESULT([no])
fi
fi
])
dnl
dnl XFCE_PANEL_PLUGIN(var, version)
dnl
dnl Sets $var_CFLAGS, $var_LIBS and $var_PLUGINSDIR
dnl
AC_DEFUN([XFCE_PANEL_PLUGIN],
[
BM_DEPEND([$1], [xfce4-panel-1.0], [$2])
dnl Check if the panel is threaded
ac_CFLAGS=$$1_CFLAGS
AC_MSG_CHECKING([whether the panel is threaded])
if $PKG_CONFIG --atleast-version=4.1.7 xfce4-panel-1.0; then
$1_CFLAGS="$ac_CFLAGS -DXFCE_PANEL_THREADED=1 -DXFCE_PANEL_LOCK\(\)=gdk_threads_enter\(\) -DXFCE_PANEL_UNLOCK\(\)=gdk_threads_leave\(\)"
AC_MSG_RESULT([yes])
else
$1_CFLAGS="$ac_CFLAGS -DXFCE_PANEL_LOCK\(\)=do{}while\(0\) -DXFCE_PANEL_UNLOCK\(\)=do{}while\(0\)"
AC_MSG_RESULT([no])
fi
dnl Check where to put the plugins to
AC_ARG_WITH([pluginsdir],
AC_HELP_STRING([--with-pluginsdir=DIR], [Install plugins dir DIR]),
[$1_PLUGINSDIR=$withval],
[$1_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce4-panel-1.0`])
AC_MSG_CHECKING([where to install panel plugins])
AC_SUBST([$1_PLUGINSDIR])
AC_MSG_RESULT([$$1_PLUGINSDIR])
])
dnl
dnl XFCE_MCS_PLUGIN(var, version)
dnl
dnl sets $var_CFLAGS, $var_LIBS and $var_PLUGINSDIR
dnl
AC_DEFUN([XFCE_MCS_PLUGIN],
[
BM_DEPEND([$1], [xfce-mcs-manager], [$2])
dnl Check where to put the plugins to
AC_MSG_CHECKING([where to install MCS plugins])
$1_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce-mcs-manager`
AC_SUBST([$1_PLUGINSDIR])
AC_MSG_RESULT([$$1_PLUGINSDIR])
])

380
m4/glib-gettext.m4

@ -1,380 +0,0 @@
# Copyright (C) 1995-2002 Free Software Foundation, Inc.
# Copyright (C) 2001-2003 Red Hat, Inc.
#
# This file is free software, distributed under the terms of the GNU
# General Public License. As a special exception to the GNU General
# Public License, this file may be distributed as part of a program
# that contains a configuration script generated by Autoconf, under
# the same distribution terms as the rest of that program.
#
# This file can 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.
#
# Macro to add for using GNU gettext.
# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
#
# Modified to never use included libintl.
# Owen Taylor <otaylor@redhat.com>, 12/15/1998
#
# Major rework to remove unused code
# Owen Taylor <otaylor@redhat.com>, 12/11/2002
#
# Added better handling of ALL_LINGUAS from GNU gettext version
# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
#
# We need this here as well, since someone might use autoconf-2.5x
# to configure GLib then an older version to configure a package
# using AM_GLIB_GNU_GETTEXT
AC_PREREQ(2.53)
dnl
dnl We go to great lengths to make sure that aclocal won't
dnl try to pull in the installed version of these macros
dnl when running aclocal in the glib directory.
dnl
m4_copy([AC_DEFUN],[glib_DEFUN])
m4_copy([AC_REQUIRE],[glib_REQUIRE])
dnl
dnl At the end, if we're not within glib, we'll define the public
dnl definitions in terms of our private definitions.
dnl
# GLIB_LC_MESSAGES
#--------------------
glib_DEFUN([GLIB_LC_MESSAGES],
[AC_CHECK_HEADERS([locale.h])
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, 1,
[Define if your <locale.h> file defines LC_MESSAGES.])
fi
fi])
# GLIB_PATH_PROG_WITH_TEST
#----------------------------
dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
glib_DEFUN([GLIB_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 ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
AC_MSG_RESULT([$]$1)
else
AC_MSG_RESULT(no)
fi
AC_SUBST($1)dnl
])
# GLIB_WITH_NLS
#-----------------
glib_DEFUN([GLIB_WITH_NLS],
dnl NLS is obligatory
[USE_NLS=yes
AC_SUBST(USE_NLS)
gt_cv_have_gettext=no
CATOBJEXT=NONE
XGETTEXT=:
INTLLIBS=
AC_CHECK_HEADER(libintl.h,
[gt_cv_func_dgettext_libintl="no"
libintl_extra_libs=""
#
# First check in libc
#
AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
[AC_TRY_LINK([
#include <libintl.h>
],
[return (int) dgettext ("","")],
gt_cv_func_dgettext_libc=yes,
gt_cv_func_dgettext_libc=no)
])
if test "$gt_cv_func_dgettext_libc" = "yes" ; then
AC_CHECK_FUNCS(bind_textdomain_codeset)
fi
#
# If we don't have everything we want, check in libintl
#
if test "$gt_cv_func_dgettext_libc" != "yes" \
|| test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
AC_CHECK_LIB(intl, bindtextdomain,
[AC_CHECK_LIB(intl, dgettext,
gt_cv_func_dgettext_libintl=yes)])
if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
AC_MSG_CHECKING([if -liconv is needed to use gettext])
AC_MSG_RESULT([])
AC_CHECK_LIB(intl, dcgettext,
[gt_cv_func_dgettext_libintl=yes
libintl_extra_libs=-liconv],
:,-liconv)
fi
#
# If we found libintl, then check in it for bind_textdomain_codeset();
# we'll prefer libc if neither have bind_textdomain_codeset(),
# and both have dgettext
#
if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
glib_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $libintl_extra_libs"
unset ac_cv_func_bind_textdomain_codeset
AC_CHECK_FUNCS(bind_textdomain_codeset)
LIBS="$glib_save_LIBS"
if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
gt_cv_func_dgettext_libc=no
else
if test "$gt_cv_func_dgettext_libc" = "yes"; then
gt_cv_func_dgettext_libintl=no
fi
fi
fi
fi
if test "$gt_cv_func_dgettext_libc" = "yes" \
|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
gt_cv_have_gettext=yes
fi
if test "$gt_cv_func_dgettext_libintl" = "yes"; then
INTLLIBS="-lintl $libintl_extra_libs"
fi
if test "$gt_cv_have_gettext" = "yes"; then
AC_DEFINE(HAVE_GETTEXT,1,
[Define if the GNU gettext() function is already present or preinstalled.])
GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
glib_save_LIBS="$LIBS"
LIBS="$LIBS $INTLLIBS"
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[case $host in
*-*-solaris*)
dnl On Solaris, if bind_textdomain_codeset is in libc,
dnl GNU format message catalog is always supported,
dnl since both are added to the libc all together.
dnl Hence, we'd like to go with DATADIRNAME=share and
dnl and CATOBJEXT=.gmo in this case.
AC_CHECK_FUNC(bind_textdomain_codeset,
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
;;
*)
CATOBJEXT=.mo
DATADIRNAME=lib
;;
esac])
LIBS="$glib_save_LIBS"
INSTOBJEXT=.mo
else
gt_cv_have_gettext=no
fi
fi
])
if test "$gt_cv_have_gettext" = "yes" ; then
AC_DEFINE(ENABLE_NLS, 1,
[always defined to indicate that i18n is enabled])
fi
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is not GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
# We need to process the po/ directory.
POSUB=po
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
dnl Make all variables we use known to autoconf.
AC_SUBST(CATALOGS)
AC_SUBST(CATOBJEXT)
AC_SUBST(DATADIRNAME)
AC_SUBST(GMOFILES)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLLIBS)
AC_SUBST(PO_IN_DATADIR_TRUE)
AC_SUBST(PO_IN_DATADIR_FALSE)
AC_SUBST(POFILES)
AC_SUBST(POSUB)
])
# AM_GLIB_GNU_GETTEXT
# -------------------
# Do checks necessary for use of gettext. If a suitable implementation
# of gettext is found in either in libintl or in the C library,
# it will set INTLLIBS to the libraries needed for use of gettext
# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
# on various variables needed by the Makefile.in.in installed by
# glib-gettextize.
dnl
glib_DEFUN([GLIB_GNU_GETTEXT],
[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_HEADER_STDC])dnl
GLIB_LC_MESSAGES
GLIB_WITH_NLS
if test "$gt_cv_have_gettext" = "yes"; then
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
AC_MSG_CHECKING(for catalogs to be installed)
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
useit=no
if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
desiredlanguages="$LINGUAS"
else
desiredlanguages="$ALL_LINGUAS"
fi
for desiredlang in $desiredlanguages; do
# Use the presentlang catalog if desiredlang is
# a. equal to presentlang, or
# b. a variant of presentlang (because in this case,
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
"$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
fi
done
LINGUAS=$NEW_LINGUAS
AC_MSG_RESULT($LINGUAS)
fi
dnl Construct list of names of catalog files to be constructed.
if test -n "$LINGUAS"; then
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
fi
fi
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl Generate list of files to be processed by xgettext which will
dnl be included in po/Makefile.
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
posrcprefix="$srcdir/"
else
posrcprefix="../$srcdir/"
fi
else
posrcprefix="../"
fi
rm -f po/POTFILES
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
< $srcdir/po/POTFILES.in > po/POTFILES
])
# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
# -------------------------------
# Define VARIABLE to the location where catalog files will
# be installed by po/Makefile.
glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
glib_save_prefix="$prefix"
glib_save_exec_prefix="$exec_prefix"
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
if test "x$CATOBJEXT" = "x.mo" ; then
localedir=`eval echo "${libdir}/locale"`
else
localedir=`eval echo "${datadir}/locale"`
fi
prefix="$glib_save_prefix"
exec_prefix="$glib_save_exec_prefix"
AC_DEFINE_UNQUOTED($1, "$localedir",
[Define the location where the catalogs will be installed])
])
dnl
dnl Now the definitions that aclocal will find
dnl
ifdef(glib_configure_in,[],[
AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
])dnl

27
m4/i18n.m4

@ -1,27 +0,0 @@
dnl I18n support
dnl
dnl Copyright (c) 2003 Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de>
dnl
dnl BM_I18N(pkgname, languages)
AC_DEFUN([BM_I18N],
[
GETTEXT_PACKAGE=$1
AC_SUBST([GETTEXT_PACKAGE])
AC_DEFINE([GETTEXT_PACKAGE], ["$1"], [Name of default gettext domain])
ALL_LINGUAS="$2"
AM_GLIB_GNU_GETTEXT
dnl This is required on some linux systems
AC_CHECK_FUNC([bind_textdomain_codeset])
AC_MSG_CHECKING([for locales directory])
AC_ARG_WITH([locales-dir],
AC_HELP_STRING([--with-locales-dir=DIR], [Install locales into DIR]),
[localedir=$withval],
[localedir=$datadir/locale])
AC_MSG_RESULT([$localedir])
AC_SUBST([localedir])
])

57
m4/pkg.m4

@ -1,57 +0,0 @@
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
dnl also defines GSTUFF_PKG_ERRORS on error
AC_DEFUN([PKG_CHECK_MODULES], [
succeeded=no
if test -z "$PKG_CONFIG"; then
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
fi
if test "$PKG_CONFIG" = "no" ; then
echo "*** The pkg-config script could not be found. Make sure it is"
echo "*** in your path, or set the PKG_CONFIG environment variable"
echo "*** to the full path to pkg-config."
echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
else
PKG_CONFIG_MIN_VERSION=0.9.0
if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
if $PKG_CONFIG --exists "$2" ; then
AC_MSG_RESULT(yes)
succeeded=yes
AC_MSG_CHECKING($1_CFLAGS)
$1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
AC_MSG_RESULT($$1_CFLAGS)
AC_MSG_CHECKING($1_LIBS)
$1_LIBS=`$PKG_CONFIG --libs "$2"`
AC_MSG_RESULT($$1_LIBS)
else
$1_CFLAGS=""
$1_LIBS=""
## If we have a custom action on failure, don't print errors, but
## do set a variable so people can do so.
$1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
ifelse([$4], ,echo $$1_PKG_ERRORS,)
fi
AC_SUBST($1_CFLAGS)
AC_SUBST($1_LIBS)
else
echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
echo "*** See http://www.freedesktop.org/software/pkgconfig"
fi
fi
if test $succeeded = yes; then
ifelse([$3], , :, [$3])
else
ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
fi
])

69
mkinstalldirs

@ -1,32 +1,20 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
scriptversion=2004-02-15.20
# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain.
#
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
Create each directory DIR (with mode MODE, if specified), including all
leading file name components.
Report bugs to <bug-automake@gnu.org>."
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage"
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
@ -35,10 +23,6 @@ while test $# -gt 0 ; do
dirmode=$1
shift
;;
--version)
echo "$0 $scriptversion"
exit 0
;;
--) # stop option processing
shift
break
@ -66,37 +50,17 @@ case $# in
0) exit 0 ;;
esac
# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
# mkdir -p a/c at the same time, both will detect that a is missing,
# one will create a, then the other will try to create a and die with
# a "File exists" error. This is a problem when calling mkinstalldirs
# from a parallel make. We use --version in the probe to restrict
# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
test -d ./-p && rmdir ./-p
test -d ./--version && rmdir ./--version
fi
;;
*)
if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
test ! -d ./--version; then
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
else
# Clean up after NextStep and OpenStep mkdir.
for d in ./-m ./-p ./--version "./$dirmode";
do
test -d $d && rmdir $d
done
fi
;;
esac
@ -120,17 +84,17 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
@ -143,8 +107,5 @@ exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
# mkinstalldirs ends here

12
panel/xfce_support.c

@ -323,16 +323,10 @@ set_window_skip (GtkWidget * win)
/* DND
* ---
*/
enum
{
TARGET_STRING,
TARGET_ROOTWIN,
TARGET_URL
};
static GtkTargetEntry target_table[] = {
{"text/uri-list", 0, TARGET_URL},
{"STRING", 0, TARGET_STRING}
{"text/uri-list", 0, 0},
{"UTF8_STRING", 0, 1},
{"STRING", 0, 2}
};
static guint n_targets = sizeof (target_table) / sizeof (target_table[0]);

28
plugins/launcher/launcher.c

@ -711,6 +711,12 @@ static char *category_icons [] = {
N_("Windows programs")
};
static void entry_dialog_data_received (GtkWidget *w, GList *data,
gpointer user_data);
static void launcher_dialog_data_received (GtkWidget *tv, GList *data,
gpointer user_data);
/* entry dialog */
static void
update_entry_info (EntryDialog *ed)
@ -1238,6 +1244,10 @@ entry_properties_dialog (Entry *entry, GtkWindow *parent)
g_object_unref (sg);
dnd_set_drag_dest (ed->dlg);
dnd_set_callback (ed->dlg, DROP_CALLBACK (entry_dialog_data_received),
ed);
gtk_dialog_run (GTK_DIALOG (ed->dlg));
gtk_widget_hide (ed->dlg);
@ -1465,6 +1475,9 @@ launcher_dialog_add_item_tree (LauncherDialog *ld, GtkBox *box)
g_object_unref (G_OBJECT (store));
dnd_set_drag_dest (tv);
dnd_set_callback (tv, DROP_CALLBACK (launcher_dialog_data_received), ld);
/* create the view */
col = gtk_tree_view_column_new ();
gtk_tree_view_append_column (GTK_TREE_VIEW (tv), col);
@ -1849,8 +1862,23 @@ launcher_properties_dialog (Launcher * launcher, GtkContainer * container,
launcher_dialog_add_item_tree (ld, GTK_BOX (vbox));
}
/* dnd */
static void
entry_dialog_data_received (GtkWidget *tv, GList *data, gpointer user_data)
{
/*EntryDialog *ed = user_data;*/
}
static void
launcher_dialog_data_received (GtkWidget *tv, GList *data, gpointer user_data)
{
/*LauncherDialog *ld = user_data;*/
}
/* xml handling *
* ------------ */
static Entry*
create_entry_from_xml (xmlNodePtr node)
{

244
po/Makefile.in.in

@ -1,244 +0,0 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# 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.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
libdir = @libdir@
localedir = @localedir@
gnulocaledir = @localedir@
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(GETTEXT_PACKAGE).po \
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $$dir; \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "glib"; then \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
check: all
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
# update-po
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
rm -f $$lang.old.po; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
fi; \
done
# POTFILES is created from POTFILES.in by stripping comments, empty lines
# and Intltool tags (enclosed in square brackets), and appending a full
# relative path to them
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' \
-e "s/^\[.*\] +//" \
-e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
Makefile: Makefile.in.in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Loading…
Cancel
Save