From: lace <> Date: Thu, 22 Dec 2005 10:01:43 +0000 (+0000) Subject: Prevent: Prevent: .../bonobo/bonobo-i18n.h:47:1: warning: "_" redefined X-Git-Tag: bp_HEAD~24 X-Git-Url: https://git.jankratochvil.net/?p=captive.git;a=commitdiff_plain;h=0a378446afa7c5b56b2902a5d09c8e31e936ed49 Prevent: Prevent: .../bonobo/bonobo-i18n.h:47:1: warning: "_" redefined Move AH_BOTTOM() to to prevent its autoconf(1) mangling. --- diff --git a/configure.ac b/configure.ac index fb9b187..e189390 100644 --- a/configure.ac +++ b/configure.ac @@ -166,45 +166,8 @@ AH_BOTTOM([ * would discard the effect of _FILE_OFFSET_BITS by AC_SYS_LARGEFILE. */ -#ifdef ENABLE_NLS -/* is taken from "$(top_srcdir)/intl" if system doesn't provide intl */ -# include -#ifdef LIBCAPTIVE -# define _(String) dgettext (PACKAGE,String) -#else -# define _(String) gettext (String) -#endif /* LIBCAPTIVE */ -# ifdef gettext_noop -# define N_(String) gettext_noop (String) -# else -# define N_(String) (String) -# endif -#else /* !ENABLE_NLS */ -/* Stubs that do something close enough. */ -# define textdomain(String) (String) -# define gettext(String) (String) -# define dgettext(Domain,Message) (Message) -# define dcgettext(Domain,Message,Type) (Message) -# define bindtextdomain(Domain,Directory) (Domain) -# define _(String) (String) -# define N_(String) (String) -#endif /* !ENABLE_NLS */ - -#include /* for 'gchar' */ -#define G_LOG_DOMAIN ((const gchar *)"Captive") - -/* Ensure we have proper -I options: */ -#if defined(CAPTIVE_USE_GNOME_VFS_MODULE) || defined(CAPTIVE_USE_GNOME_VFS) -#ifndef HAVE_GNOME_VFS_READ_ENTIRE_FILE -#include -GnomeVFSResult gnome_vfs_read_entire_file(const char *uri,int *file_size,char **file_contents); -#endif -#endif - /* Supplemental definitions not possible in this file. */ -#ifdef LIBCAPTIVE #include "captive/config2.h" -#endif #endif /* !_CAPTIVE_CONFIG_H */ ]) @@ -454,6 +417,9 @@ GLADE_W_INIT([ fi ],[ AC_MSG_WARN([Captive requires libntfs (of ntfsprogs-devel) for --enable-install-pkg.]) ]) ]) +if $have_gnome;then + GNOMEUI_CFLAGS="$GNOMEUI_CFLAGS -DCAPTIVE_USING_GNOMEUI" +fi AC_SUBST(GNOMEUI_CFLAGS) AC_SUBST(GNOMEUI_LIBS) AC_SUBST(LIBNTFS_LIBS) diff --git a/src/libcaptive/include/captive/config2.h b/src/libcaptive/include/captive/config2.h index d90780f..09857ca 100644 --- a/src/libcaptive/include/captive/config2.h +++ b/src/libcaptive/include/captive/config2.h @@ -21,6 +21,56 @@ #define _CAPTIVE_CONFIG2_H 1 +/* Prevent: /usr/include/libbonobo-2.0/bonobo/bonobo-i18n.h:47:1: warning: "_" redefined */ +/* #undef's need to be out of AH_BOTTOM() of 'configure.ac' to not to be commented out. */ +#ifdef CAPTIVE_USING_GNOMEUI +# include +# undef textdomain +# undef gettext +# undef dgettext +# undef dcgettext +# undef bindtextdomain +# undef bind_textdomain_codeset +# undef _ +# undef N_ +#endif /* CAPTIVE_USING_GNOMEUI */ +#ifdef ENABLE_NLS +/* is taken from "$(top_srcdir)/intl" if system doesn't provide intl */ +# include +#ifdef LIBCAPTIVE +# define _(String) dgettext (PACKAGE,String) +#else +# define _(String) gettext (String) +#endif /* LIBCAPTIVE */ +# ifdef gettext_noop +# define N_(String) gettext_noop (String) +# else +# define N_(String) (String) +# endif +#else /* !ENABLE_NLS */ +/* Stubs that do something close enough. */ +# define textdomain(String) (String) +# define gettext(String) (String) +# define dgettext(Domain,Message) (Message) +# define dcgettext(Domain,Message,Type) (Message) +# define bindtextdomain(Domain,Directory) (Domain) +# define _(String) (String) +# define N_(String) (String) +#endif /* !ENABLE_NLS */ + +#include /* for 'gchar' */ +/* Prevent: /usr/include/glib-2.0/glib/gmessages.h:123:1: warning: this is the location of the previous definition */ +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN ((const gchar *)"Captive") + +/* Ensure we have proper -I options: */ +#if defined(CAPTIVE_USE_GNOME_VFS_MODULE) || defined(CAPTIVE_USE_GNOME_VFS) +#ifndef HAVE_GNOME_VFS_READ_ENTIRE_FILE +#include +GnomeVFSResult gnome_vfs_read_entire_file(const char *uri,int *file_size,char **file_contents); +#endif +#endif + /* We need to redefine it here as any '#undef' in config.h gets commented * out during 'config.h.in' -> 'config.h' pass. */