Commit 7c00da51 authored by Jonh Wendell S. Santana's avatar Jonh Wendell S. Santana
Browse files

Another Jaap Patch

svn path=/trunk/; revision=6
parent 57a0bf75
......@@ -4,156 +4,21 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
PKG_NAME="vinagre"
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
PATH="$GNOME2_DIR/bin:$PATH"
export PATH
export LD_LIBRARY_PATH
fi
(test -f $srcdir/configure.ac) || {
(test -f $srcdir/src/vinagre-main.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
echo " top-level $PKG_NAME 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 "^IT_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 "^AM_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
which gnome-autogen.sh || {
echo "You need to install gnome-common from the GNOME CVS"
exit 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 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 "^IT_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 "^AM_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 --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
conf_flags="--enable-maintainer-mode"
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
REQUIRED_AUTOCONF_VERSION=2.57
REQUIRED_AUTOMAKE_VERSION=1.7
REQUIRED_INTLTOOL_VERSION=0.35.0
REQUIRED_PKG_CONFIG_VERSION=0.16.0
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
dnl Process this file with autoconf to produce a configure script.
# Process this file with autoconf to produce a configure script.
AC_INIT(vinagre, 0.1)
......@@ -13,47 +13,53 @@ AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AM_PROG_LIBTOOL
CFLAGS="${CFLAGS} -Wall"
dnl ***************************************************************************
dnl Internationalization
dnl ***************************************************************************
#*******************************************************************************
# Internationalization
#*******************************************************************************
GETTEXT_PACKAGE=vinagre
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
AM_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT
CFLAGS="${CFLAGS} -Wall"
AC_ARG_ENABLE(deprecations,
[AC_HELP_STRING([--disable-deprecations],
[don't warn about deprecated usages [default=no]])],,
[enable_deprecations=yes])
if test "x$enable_deprecations" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS="\
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
-DGNOME_DISABLE_DEPRECATED"
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
#*******************************************************************************
# Check required GNOME libraries
#*******************************************************************************
PKG_CHECK_MODULES(VINAGRE, [gtk+-2.0 >= 2.8 libglade-2.0 >= 2.6.0 gconf-2.0 ])
GLIB_REQUIRED=2.10.0
GTK_REQUIRED=2.10.0
LIBGLADE_REQUIRED=2.6.0
GCONF_REQUIRED=2.16.0
PKG_CHECK_MODULES(VINAGRE, \
glib-2.0 >= $GLIB_REQUIRED \
gtk+-2.0 >= $GTK_REQUIRED \
libglade-2.0 >= $LIBGLADE_REQUIRED \
gconf-2.0 >= $GCONF_REQUIRED)
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)
#*******************************************************************************
# Check for gnutls for gtk-vnc
#*******************************************************************************
PKG_CHECK_MODULES(GTKVNC, [gnutls])
AC_SUBST(GTKVNC_CFLAGS)
AC_SUBST(GTKVNC_LIBS)
#
#*******************************************************************************
# Check for Avahi
#
#*******************************************************************************
AVAHI_REQUIRED=0.6.17
AC_ARG_ENABLE(avahi,
AS_HELP_STRING([--enable-avahi],[Enable use of avahi]),
[case "${enableval}" in
......@@ -67,13 +73,15 @@ AVAHI_CFLAGS=
AVAHI_LIBS=
if test "x$VINAGRE_ENABLE_AVAHI" = "xyes" ; then
PKG_CHECK_MODULES(AVAHI,
[avahi-client >= 0.6.17 avahi-glib >= 0.6.17 ])
[avahi-client >= $AVAHI_REQUIRED avahi-glib >= $AVAHI_REQUIRED ])
AVAHI_CFLAGS="$AVAHI_CFLAGS -DVINAGRE_HAVE_AVAHI"
fi
AC_SUBST(AVAHI_CFLAGS)
AC_SUBST(AVAHI_LIBS)
AM_CONDITIONAL(VINAGRE_AVAHI, [test "x$VINAGRE_ENABLE_AVAHI" = "xyes"])
#*******************************************************************************
AC_OUTPUT([
Makefile
data/Makefile
......@@ -82,3 +90,14 @@ src/Makefile
src/gtk-vnc/Makefile
po/Makefile.in
])
#*******************************************************************************
echo "
Configure summary:
Compiler ...................: ${CC}
Compiler Flags .............: ${CFLAGS}
Avahi support ..............: ${VINAGRE_ENABLE_AVAHI}
"
SUBDIRS = gtk-vnc
INCLUDES = \
$(DISABLE_DEPRECATED_CFLAGS) \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DVINAGRE_GLADEDIR=\""$(datadir)/vinagre"\" \
$(VINAGRE_CFLAGS) \
INCLUDES = \
-DBINDIR=\"$(bindir)\" \
-DDATADIR=\"$(datadir)\" \
-DPREFIX=\""$(prefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DVINAGRE_DATADIR=\""$(datadir)/vinagre"\" \
-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
$(VINAGRE_CFLAGS) \
$(AVAHI_CFLAGS)
bin_PROGRAMS = vinagre
......
......@@ -242,6 +242,7 @@ vinagre_cmd_help_about (GtkAction *action,
"website", "http://www.gnome.org/~jwendell/vinagre",
"website-label", _("Vinagre Website"),
NULL);
g_free (license_trans);
}
......
/*
* vinagre-main.c
* This file is part of vinagre
*
* Copyright (C) 2007 - Jonh Wendell <wendell@bani.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <gtk/gtk.h>
#include <glib/gi18n.h>
......@@ -6,7 +29,7 @@
#include "vinagre-prefs-manager.h"
int main (int argc, char **argv) {
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
......@@ -14,7 +37,6 @@ int main (int argc, char **argv) {
g_thread_init (NULL);
gtk_init (&argc, &argv);
g_set_application_name (_("Vinagre"));
vinagre_prefs_manager_init ();
......
/*
* vinagre-main.h
* This file is part of vinagre
*
* Copyright (C) 2007 - Jonh Wendell <wendell@bani.com.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "vinagre-window.h"
VinagreWindow *main_window;
......@@ -85,7 +85,7 @@ vinagre_utils_get_glade_filename (void)
if (g_file_test (VINAGRE_GLADE_FILE, G_FILE_TEST_EXISTS))
return VINAGRE_GLADE_FILE;
else
return VINAGRE_GLADEDIR "/" VINAGRE_GLADE_FILE;
return VINAGRE_DATADIR "/" VINAGRE_GLADE_FILE;
}
const gchar *
......@@ -94,7 +94,7 @@ vinagre_utils_get_ui_xml_filename (void)
if (g_file_test (VINAGRE_UI_XML_FILE, G_FILE_TEST_EXISTS))
return VINAGRE_UI_XML_FILE;
else
return VINAGRE_GLADEDIR "/" VINAGRE_UI_XML_FILE;
return VINAGRE_DATADIR "/" VINAGRE_UI_XML_FILE;
}
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment