diff --git a/plug-ins/perl/Changes b/plug-ins/perl/Changes index 8ab0440333..38675e0bdd 100644 --- a/plug-ins/perl/Changes +++ b/plug-ins/perl/Changes @@ -6,6 +6,9 @@ Revision history for Gimp-Perl extension. called. - started to revamp the extra argument handling. - updated PDB Explorer a bit, still broken. + - started i18n. + - put help window into a scrolledwindow, as to a suggestion by Jens + Lauterbach. Karlsruhe rules! 1.13 Wed Sep 8 02:55:43 CEST 1999 - removed some glib-1.1 compatibility cruft. diff --git a/plug-ins/perl/Gimp.pm b/plug-ins/perl/Gimp.pm index 880ec29f14..955c1e9b3e 100644 --- a/plug-ins/perl/Gimp.pm +++ b/plug-ins/perl/Gimp.pm @@ -2,12 +2,12 @@ package Gimp; use strict 'vars'; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD %EXPORT_TAGS @EXPORT_FAIL - @_consts @_procs $interface_pkg $interface_type @_param @_al_consts + $interface_pkg $interface_type @PREFIXES $_PROT_VERSION @gimp_gui_functions $function $basename $spawn_opts $in_quit $in_run $in_net $in_init $in_query $no_SIG $help $verbose $host $in_top); -use subs qw(init end lock unlock canonicalize_color); +use subs qw(init end lock unlock canonicalize_color __); require DynaLoader; @@ -15,7 +15,7 @@ require DynaLoader; $VERSION = 1.14; -@_param = qw( +my @_param = qw( PARAM_BOUNDARY PARAM_CHANNEL PARAM_COLOR PARAM_DISPLAY PARAM_DRAWABLE PARAM_END PARAM_FLOAT PARAM_IMAGE PARAM_INT32 PARAM_FLOATARRAY PARAM_INT16 PARAM_PARASITE PARAM_STRING PARAM_PATH PARAM_INT16ARRAY @@ -24,7 +24,7 @@ $VERSION = 1.14; ); # constants that, in some earlier version, were autoloaded -@_consts = (@_param, +my @_consts = (@_param, #ENUM_NAME# 'PRESSURE', 'SOFT', 'HARD', 'RGBA_IMAGE', 'INDEXED_IMAGE', 'GRAYA_IMAGE', 'RGB_IMAGE', 'INDEXEDA_IMAGE', 'GRAY_IMAGE', 'CUSTOM', 'FG_BG_HSV', 'FG_TRANS', 'FG_BG_RGB', 'BLUE_CHANNEL', @@ -68,8 +68,6 @@ sub ORIENTATION_HORIZONTAL () { &HORIZONTAL } sub ORIENTATION_VERTICAL () { &VERTICAL } sub ORIENTATION_UNKNOWN () { &UNKNOWN } -@_procs = ('main','xlfd_size'); - bootstrap Gimp $VERSION; #ENUM_DEFS# @@ -125,17 +123,18 @@ sub croak { goto &Carp::croak; } +my @_procs = ('main', 'xlfd_size', '__'); +my @_default = (@_procs, ':consts' ,':_auto2'); + # we really abuse the import facility.. sub import($;@) { my $pkg = shift; my $up = caller; my @export; - # make a quick but dirty guess ;) + @_=@_default unless @_; - @_=(@_procs,':consts',':_auto2') unless @_; - - for(@_) { + for(map { $_ eq ":DEFAULT" ? @_default : $_ } @_) { if ($_ eq ":auto") { push(@export,@_consts,@_procs); *{"$up\::AUTOLOAD"} = sub { @@ -147,8 +146,8 @@ sub import($;@) { } elsif ($_ eq ":_auto2") { push(@export,@_consts,@_procs); *{"$up\::AUTOLOAD"} = sub { - warn "$function: calling $AUTOLOAD without specifying the :auto import tag is deprecated!\n"; - croak "Cannot call '$AUTOLOAD' at this time" unless initialized(); + warn __"$function: calling $AUTOLOAD without specifying the :auto import tag is deprecated!\n"; + croak __"Cannot call '$AUTOLOAD' at this time" unless initialized(); my ($class,$name) = $AUTOLOAD =~ /^(.*)::(.*?)$/; *{$AUTOLOAD} = sub { Gimp->$name(@_) }; goto &$AUTOLOAD; @@ -158,7 +157,7 @@ sub import($;@) { } elsif ($_ eq ":param") { push(@export,@_param); } elsif (/^interface=(\S+)$/) { - croak "interface=... tag is no longer supported\n"; + croak __"interface=... tag is no longer supported\n"; } elsif ($_=~/spawn_options=(\S+)/) { $spawn_opts = $1; } elsif ($_ ne "") { @@ -166,7 +165,7 @@ sub import($;@) { } elsif ($_ eq "") { #nop #d#FIXME, Perl-Server requires this! } else { - croak "$_ is not a valid import tag for package $pkg"; + croak __"$_ is not a valid import tag for package $pkg"; } } @@ -221,7 +220,7 @@ sub canonicalize_colour { } else { unless (%rgb_db) { if ($rgb_db_path) { - open RGB_TEXT,"<$rgb_db_path" or croak "unable to open $rgb_db_path"; + open RGB_TEXT,"<$rgb_db_path" or croak __"unable to open $rgb_db_path"; } else { *RGB_TEXT=*DATA; } @@ -234,7 +233,7 @@ sub canonicalize_colour { if ($rgb_db{lc($_[0])}) { return $rgb_db{lc($_[0])}; } else { - croak "Unable to grok '".join(",",@_),"' as colour specifier"; + croak sprintf __"Unable to grok '%s' as colour specifier", join(",",@_); } } } @@ -262,15 +261,14 @@ if (@ARGV) { $_=shift(@ARGV); if (/^-h$|^--?help$|^-\?$/) { $help=1; - print < used internally only -h | -help | --help | -? print some help -v | --verbose be more verbose in what you do --host|--tcp HOST[:PORT] connect to HOST (optionally using PORT) (for more info, see Gimp::Net(3)) -EOF +"; } elsif (/^-v$|^--verbose$/) { $verbose++; } elsif (/^--host$|^--tcp$/) { @@ -302,7 +300,7 @@ sub _initialized_callback { require Gimp::Compat; $compat_gimp_version[0] == $Gimp::Compat::max_gimp_version[0] && $compat_gimp_version[1] == $Gimp::Compat::max_gimp_version[1] - or die "FATAL: Gimp::Compat version mismatch\n"; + or die __"FATAL: Gimp::Compat version mismatch\n"; } } if (@log) { @@ -355,7 +353,7 @@ unless($no_SIG) { unless ($in_quit) { warn $_[0]; } else { - logger(message => substr($_[0],0,-1), fatal => 0, function => 'WARNING'); + logger(message => substr($_[0],0,-1), fatal => 0, function => __"WARNING"); } }; } @@ -373,7 +371,7 @@ sub call_callback { } elsif (UNIVERSAL::can($caller,$cb)) { &{"$caller\::$cb"}; } else { - die_msg "required callback '$cb' not found\n" if $req; + die_msg __"required callback '$cb' not found\n" if $req; } } @@ -422,7 +420,7 @@ if ($interface_type=~/^lib$/i) { } elsif ($interface_type=~/^net$/i) { $interface_pkg="Gimp::Net"; } else { - croak "interface '$interface_type' unsupported."; + croak __"interface '$interface_type' unsupported."; } eval "require $interface_pkg" or croak "$@"; @@ -503,7 +501,7 @@ sub AUTOLOAD { goto &$AUTOLOAD; } } - croak "function/macro \"$name\" not found in $class"; + croak __"function/macro \"$name\" not found in $class"; } sub _pseudoclass { @@ -638,9 +636,14 @@ All constants from gimpenums.h (BG_IMAGE_FILL, RUN_NONINTERACTIVE, NORMAL_MODE, Set default spawn options to I, see L. +=item _:DEFAULT + +The default set (see below). + =back -The default (unless '' is specified) is C
. +The default (unless '' is specified) is C
. +(C<__> is used for i18n purposes). =head1 GETTING STARTED diff --git a/plug-ins/perl/Gimp.xs b/plug-ins/perl/Gimp.xs index 45dd6367ab..72ee2d7042 100644 --- a/plug-ins/perl/Gimp.xs +++ b/plug-ins/perl/Gimp.xs @@ -1,7 +1,10 @@ #include "config.h" +#include "perl-intl.h" #include +/*#include *//*notyet*//*D*/ + /* FIXME */ /* sys/param.h is redefining these! */ #undef MIN @@ -37,6 +40,9 @@ MODULE = Gimp PACKAGE = Gimp PROTOTYPES: ENABLE +BOOT: + /*setlocale (LC_MESSAGES, "");*//* done by perl *//*notyet*//*D*/ + void _exit() CODE: @@ -49,6 +55,28 @@ _exit() #endif abort(); +char * +bindtextdomain(d,dir) + char * d + char * dir + +char * +textdomain(d) + char * d + +char * +gettext(s) + char * s + +char * +dgettext(d,s) + char * d + char * s + +char * +__(s) + char * s + void xs_exit(status) int status diff --git a/plug-ins/perl/Gimp/Compat.pm b/plug-ins/perl/Gimp/Compat.pm index ff8a1f9216..ef2fc8e761 100644 --- a/plug-ins/perl/Gimp/Compat.pm +++ b/plug-ins/perl/Gimp/Compat.pm @@ -45,7 +45,7 @@ package Gimp::Compat; $VERSION=$Gimp::VERSION; -use Gimp 'croak'; +use Gimp ('croak', '__'); # as a failsafe check, lowest version NOT requiring this module @max_gimp_version = (1,1); @@ -85,7 +85,7 @@ sub xlfd_unpack { -$p -($p) (?# rgstry ) -($p) (?# encdng ) - /x or die "xlfd_unpack: unmatched XLFD '$fontname'\n"; + /x or die __"xlfd_unpack: unmatched XLFD '$fontname'\n"; my $size; if ($pixelsize && $pixelsize ne "*") { @@ -142,5 +142,3 @@ fun 1,1,gimp_paintbrush,sub { 1; - - diff --git a/plug-ins/perl/Gimp/Fu.pm b/plug-ins/perl/Gimp/Fu.pm index 9da01014c2..8c7f8bc7fe 100644 --- a/plug-ins/perl/Gimp/Fu.pm +++ b/plug-ins/perl/Gimp/Fu.pm @@ -1,6 +1,6 @@ package Gimp::Fu; -use Gimp 'croak'; +use Gimp ('croak', '__'); use Gimp::Data; use File::Basename; @@ -178,10 +178,10 @@ sub interact { if ($@) { my @res = map { - die "the gtk perl module is required to run\nthis plug-in in interactive mode\n" unless defined $_->[3]; + die __"the gtk perl module is required to run\nthis plug-in in interactive mode\n" unless defined $_->[3]; $_->[3]; } @types; - Gimp::logger(message => "the gtk perl module is required to open a dialog\nwindow, running with default values", + Gimp::logger(message => __"the gtk perl module is required to open a dialog\nwindow, running with default values", fatal => 1, function => $function); return (1,@res); } @@ -213,7 +213,7 @@ sub this_script { return $this if lc($exe) eq lc($fun); push(@names,$fun); } - die "function '$exe' not found in this script (must be one of ".join(", ",@names).")\n"; + die __"function '$exe' not found in this script (must be one of ".join(", ",@names).")\n"; } my $latest_image; @@ -236,7 +236,7 @@ sub string2pf($$) { || $type==PF_SLIDER || $type==PF_SPINNER || $type==PF_ADJUSTMENT) { - die "$s: not an integer\n" unless $s==int($s); + die __"$s: not an integer\n" unless $s==int($s); $s*1; } elsif($type==PF_FLOAT) { $s*1; @@ -246,7 +246,7 @@ sub string2pf($$) { $s?1:0; #} elsif($type==PF_IMAGE) { } else { - die "conversion to type $pf_type2string{$type} is not yet implemented\n"; + die __"conversion to type $pf_type2string{$type} is not yet implemented\n"; } } @@ -291,7 +291,7 @@ Gimp::on_net { } else { my $arg=shift @ARGV; my $idx=$map{$1}; - die "$_: illegal switch, try $0 --help\n" unless defined($idx); + die __"$_: illegal switch, try $0 --help\n" unless defined($idx); $args[$idx]=string2pf($arg,$params->[$idx]); $interact--; } @@ -306,7 +306,7 @@ Gimp::on_net { next if defined $args[$i]; my $entry = $params->[$i]; $args[$i] = $entry->[3]; # Default value - die "parameter '$entry->[1]' is not optional\n" unless defined $args[$i] || $interact>0; + die __"parameter '$entry->[1]' is not optional\n" unless defined $args[$i] || $interact>0; } # Go for it @@ -638,24 +638,26 @@ sub register($$$$$$$$$;@) { } elsif (/^/) { $type = &Gimp::PROC_EXTENSION; } else { - die "menupath _must_ start with , , , or !"; + die __"menupath _must_ start with , , , or !"; } } + s%^/Xtns%__("/Xtns")%e; + s%^/Filters%__("/Filters")%e; undef $menupath if $menupath eq "";#d# - @_==0 or die "register called with too many or wrong arguments\n"; + @_==0 or die __"register called with too many or wrong arguments\n"; for my $p (@$params,@$results) { next unless ref $p; - int($p->[0]) eq $p->[0] or croak "$function: argument/return value '$p->[1]' has illegal type '$p->[0]'"; - $p->[1]=~/^[0-9a-z_]+$/ or carp "$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z and _ allowed"; + int($p->[0]) eq $p->[0] or croak __"$function: argument/return value '$p->[1]' has illegal type '$p->[0]'"; + $p->[1]=~/^[0-9a-z_]+$/ or carp __"$function: argument name '$p->[1]' contains illegal characters, only 0-9, a-z and _ allowed"; } $function="perl_fu_".$function unless $function =~ /^(?:perl_fu_|extension_|plug_in_|file_)/ || $function =~ s/^\+//; - $function=~/^[0-9a-z_]+(-ALT)?$/ or carp "$function: function name contains unusual characters, good style is to use only 0-9, a-z and _"; + $function=~/^[0-9a-z_]+(-ALT)?$/ or carp __"$function: function name contains unusual characters, good style is to use only 0-9, a-z and _"; - Gimp::logger message => "function name contains dashes instead of underscores", + Gimp::logger message => __"function name contains dashes instead of underscores", function => $function, fatal => 0 if $function =~ y/-//; @@ -676,18 +678,18 @@ sub register($$$$$$$$$;@) { for($menupath) { if (/^\//) { - @_ >= 2 or die " plug-in called without both image and drawable arguments!\n"; + @_ >= 2 or die __" plug-in called without both image and drawable arguments!\n"; @pre = (shift,shift); } elsif (/^\// or !defined $menupath) { # valid ;) } elsif (/^\//) { - @_ >= 2 or die " plug-in called without the 3 standard arguments!\n"; + @_ >= 2 or die __" plug-in called without the 3 standard arguments!\n"; @pre = (shift,shift); } elsif (/^\//) { - @_ >= 4 or die " plug-in called without the 5 standard arguments!\n"; + @_ >= 4 or die __" plug-in called without the 5 standard arguments!\n"; @pre = (shift,shift,shift,shift); } elsif (defined $_) { - die "menupath _must_ start with , , , or !"; + die __"menupath _must_ start with , , , or !"; } } if ($run_mode == &Gimp::RUN_INTERACTIVE @@ -720,7 +722,7 @@ sub register($$$$$$$$$;@) { } elsif ($run_mode == &Gimp::RUN_NONINTERACTIVE) { # nop } else { - die "run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n"; + die __"run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n"; } $input_image = $_[0] if ref $_[0] eq "Gimp::Image"; $input_image = $pre[0] if ref $pre[0] eq "Gimp::Image"; @@ -751,7 +753,7 @@ sub register($$$$$$$$$;@) { $img->display_new unless $input_image && $$img == $$input_image; } } elsif (!@$retvals) { - warn "WARNING: $function returned something that is not an image: \"$img\"\n"; + warn __"WARNING: $function returned something that is not an image: \"$img\"\n"; } } } @@ -833,7 +835,7 @@ sub save_image($$) { $smooth=$1 eq "+", next if s/^([-+])[sS]//; $quality=$1*0.01, next if s/^-[qQ](\d+)//; $compress=$1, next if s/^-[cC](\d+)//; - croak "$_: unknown/illegal file-save option"; + croak __"$_: unknown/illegal file-save option"; } $flatten=(()=$img->get_layers)>1 unless defined $flatten; @@ -871,12 +873,11 @@ sub main { $old_trace = Gimp::set_trace (0); if ($Gimp::help) { my $this=this_script; - print < write image to disk, don't display -i | --interact let the user edit the values first script-arguments are -EOF +"; print_switches ($this); } else { Gimp::main; diff --git a/plug-ins/perl/Gimp/Lib.pm b/plug-ins/perl/Gimp/Lib.pm index 9b831eb6b0..9d5622ce0c 100644 --- a/plug-ins/perl/Gimp/Lib.pm +++ b/plug-ins/perl/Gimp/Lib.pm @@ -15,11 +15,11 @@ use subs qw( ); sub gimp_init { - Gimp::croak "gimp_init not implemented for the Lib interface"; + Gimp::croak Gimp::_("gimp_init not implemented for the Lib interface"); } sub gimp_end { - Gimp::croak "gimp_end not implemented for in the Lib interface"; + Gimp::croak Gimp::_("gimp_end not implemented for in the Lib interface"); } sub lock { diff --git a/plug-ins/perl/Gimp/Lib.xs b/plug-ins/perl/Gimp/Lib.xs index 74d83f9ac4..fe2c48ce18 100644 --- a/plug-ins/perl/Gimp/Lib.xs +++ b/plug-ins/perl/Gimp/Lib.xs @@ -1,4 +1,5 @@ #include "config.h" +#include "../perl-intl.h" #include #include @@ -120,13 +121,13 @@ static void old_pdl (pdl **p, short ndims, int dim0) PDL->converttype (p, PDL_B, PDL_PERM); if ((*p)->ndims < ndims + (dim0 > 1)) - croak ("dimension mismatch, pdl has dimension %d but at least %d dimensions allowed", (*p)->ndims, ndims + (dim0 > 1)); + croak (__("dimension mismatch, pdl has dimension %d but at least %d dimensions allowed"), (*p)->ndims, ndims + (dim0 > 1)); if ((*p)->ndims > ndims + 1) - croak ("dimension mismatch, pdl has dimension %d but at most %d dimensions required", (*p)->ndims, ndims + 1); + croak (__("dimension mismatch, pdl has dimension %d but at most %d dimensions required"), (*p)->ndims, ndims + 1); if ((*p)->ndims > ndims && (*p)->dims[0] != dim0) - croak ("pixel size mismatch, pdl has %d channel pixels but %d channels are required", (*p)->dims[0], dim0); + croak (__("pixel size mismatch, pdl has %d channel pixels but %d channels are required"), (*p)->dims[0], dim0); } static void pixel_rgn_pdl_delete_data (pdl *p, int param) @@ -216,7 +217,7 @@ static SV *new_gdrawable (gint32 id) GDrawable *gdr = gimp_drawable_get (id); if (!gdr) - croak ("unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)", id); + croak (__("unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)"), id); if (!stash) stash = gv_stashpv (PKG_GDRAWABLE, 1); @@ -234,7 +235,7 @@ static SV *new_gdrawable (gint32 id) static GDrawable *old_gdrawable (SV *sv) { if (!(sv_derived_from (sv, PKG_GDRAWABLE))) - croak ("argument is not of type " PKG_GDRAWABLE); + croak (__("argument is not of type %s"), PKG_GDRAWABLE); /* the next line lacks any type of checking. */ return (GDrawable *)SvIV(SvRV(sv)); @@ -257,7 +258,7 @@ SV *new_tile (GTile *tile, SV *gdrawable) static GTile *old_tile (SV *sv) { if (!sv_derived_from (sv, PKG_TILE)) - croak ("argument is not of type " PKG_TILE); + croak (__("argument is not of type %s"), PKG_TILE); /* the next line lacks any type of checking. */ return (GTile *)SvIV(*(hv_fetch ((HV*)SvRV(sv), "_tile", 5, 0))); @@ -289,7 +290,7 @@ static SV *new_gpixelrgn (SV *gdrawable, int x, int y, int width, int height, in || sv_derived_from (gdrawable, PKG_CHANNEL)) gdrawable = sv_2mortal (new_gdrawable (SvIV (SvRV (gdrawable)))); else - croak ("argument is not of type " PKG_GDRAWABLE); + croak (__("argument is not of type %s"), PKG_GDRAWABLE); } if (!stash) @@ -306,7 +307,7 @@ static SV *new_gpixelrgn (SV *gdrawable, int x, int y, int width, int height, in static GPixelRgn *old_pixelrgn (SV *sv) { if (!sv_derived_from (sv, PKG_PIXELRGN)) - croak ("argument is not of type " PKG_PIXELRGN); + croak (__("argument is not of type %s"), PKG_PIXELRGN); return (GPixelRgn *)SvPV_nolen(SvRV(sv)); } @@ -416,7 +417,7 @@ perl_paramdef_count (GParamDef *arg, int count) j < args[index-1].data.d_int32 - 1 ? ", " : ""); \ } \ else \ - trace_printf ("(UNINITIALIZED)"); \ + trace_printf (__("(UNINITIALIZED)")); \ trace_printf ("]"); \ } @@ -503,10 +504,10 @@ dump_params (int nparams, GParam *args, GParamDef *params) trace_printf ("%d", args[i].data.d_parasite.flags & ~found); } - trace_printf (", %d bytes data]", args[i].data.d_parasite.size); + trace_printf (__(", %d bytes data]"), args[i].data.d_parasite.size); } else - trace_printf ("[undefined]"); + trace_printf (__("[undefined]")); } break; #endif @@ -576,7 +577,7 @@ convert_array2paramdef (AV *av, GParamDef **res) count += 1 + !!is_array (SvIV (type)); } else - croak ("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE"); + croak (__("malformed paramdef, expected [PARAM_TYPE,\"NAME\",\"DESCRIPTION\"] or PARAM_TYPE")); } if (def) @@ -663,10 +664,10 @@ unbless (SV *sv, char *type, char *croak_str) if (SvTYPE (SvRV (sv)) == SVt_PVMG) return SvIV (SvRV (sv)); else - strcpy (croak_str, "only blessed scalars accepted here"); + strcpy (croak_str, __("only blessed scalars accepted here")); } else - sprintf (croak_str, "argument type %s expected (not %s)", type, HvNAME(SvSTASH(SvRV(sv)))); + sprintf (croak_str, __("argument type %s expected (not %s)"), type, HvNAME(SvSTASH(SvRV(sv)))); else return SvIV (sv); @@ -701,7 +702,7 @@ canonicalize_colour (char *err, SV *sv, GParamColor *c) PUTBACK; if (perl_call_pv ("Gimp::canonicalize_colour", G_SCALAR) != 1) - croak ("canonicalize_colour did not return a value!"); + croak (__("FATAL: canonicalize_colour did not return a value!")); SPAGAIN; @@ -718,13 +719,13 @@ canonicalize_colour (char *err, SV *sv, GParamColor *c) c->blue = SvIV(*av_fetch(av, 2, 0)); } else - sprintf (err, "a color must have three components (array elements)"); + sprintf (err, __("a color must have three components (array elements)")); } else - sprintf (err, "illegal type for colour specification"); + sprintf (err, __("illegal type for colour specification")); } else - sprintf (err, "unable to grok colour specification"); + sprintf (err, __("unable to grok colour specification")); PUTBACK; FREETMPS; @@ -747,7 +748,7 @@ static void check_for_typoe (char *croak_str, char *p) return; gotit: - sprintf (croak_str, "Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use strict'", p, b); + sprintf (croak_str, __("Expected an INT32 but got '%s'. Maybe you meant '%s' instead and forgot to 'use strict'"), p, b); } /* check for 'enumeration types', i.e. integer constants. do not allow @@ -763,7 +764,7 @@ static int check_int (char *croak_str, SV *sv) && *p != '5' && *p != '6' && *p != '7' && *p != '8' && *p != '9' && *p != '-') { - sprintf (croak_str, "Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string", p); + sprintf (croak_str, __("Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string"), p); check_for_typoe (croak_str, p); return 0; } @@ -874,7 +875,7 @@ push_gimp_sv (GParam *arg, int array_as_ref) case PARAM_STRINGARRAY: push_gimp_av (arg, d_stringarray, neuSVpv, array_as_ref); break; default: - croak ("dunno how to return param type %d", arg->type); + croak (__("dunno how to return param type %d"), arg->type); } if (sv) @@ -898,7 +899,7 @@ push_gimp_sv (GParam *arg, int array_as_ref) } \ else \ { \ - sprintf (croak_str, "perl-arrayref required as datatype for a gimp-array"); \ + sprintf (croak_str, __("perl-arrayref required as datatype for a gimp-array")); \ arg->data.datatype = 0; \ } \ } @@ -906,7 +907,7 @@ push_gimp_sv (GParam *arg, int array_as_ref) #define sv2gimp_extract_noref(fun,str) \ fun(sv); \ if (SvROK(sv)) \ - sprintf (croak_str, "Unable to convert a reference to type '%s'", str); \ + sprintf (croak_str, __("Unable to convert a reference to type '%s'"), str); \ break; /* * convert a perl scalar into a GParam, return true if @@ -957,7 +958,7 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv) arg->data.d_image = unbless(sv, PKG_IMAGE , croak_str); break; } else - strcpy (croak_str, "argument incompatible with type IMAGE"); + strcpy (croak_str, __("argument incompatible with type IMAGE")); return 0; } @@ -999,13 +1000,13 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv) arg->data.d_parasite.data = SvPV(*av_fetch(av, 2, 0), arg->data.d_parasite.size); } else - sprintf (croak_str, "illegal parasite specification, expected three array members"); + sprintf (croak_str, __("illegal parasite specification, expected three array members")); } else - sprintf (croak_str, "illegal parasite specification, arrayref expected"); + sprintf (croak_str, __("illegal parasite specification, arrayref expected")); } else - sprintf (croak_str, "illegal parasite specification, reference expected"); + sprintf (croak_str, __("illegal parasite specification, reference expected")); break; #endif @@ -1017,7 +1018,7 @@ convert_sv2gimp (char *croak_str, GParam *arg, SV *sv) case PARAM_STRINGARRAY: av2gimp (arg, sv, d_stringarray, gchar *, SvPv); break; default: - sprintf (croak_str, "dunno how to pass arg type %d", arg->type); + sprintf (croak_str, __("dunno how to pass arg type %d"), arg->type); } return 1; @@ -1221,7 +1222,7 @@ static void pii_run(char *name, int nparams, GParam *param, int *xnreturn_vals, } if (count && !err_msg) - err_msg = g_strdup_printf ("plug-in returned %d more values than expected", count); + err_msg = g_strdup_printf (__("plug-in returned %d more values than expected"), count); } while (count--) @@ -1234,7 +1235,7 @@ static void pii_run(char *name, int nparams, GParam *param, int *xnreturn_vals, LEAVE; } else - err_msg = g_strdup_printf ("being called as '%s', but '%s' not registered in the pdb", name, name); + err_msg = g_strdup_printf (__("being called as '%s', but '%s' not registered in the pdb"), name, name); if (err_msg) { @@ -1340,10 +1341,10 @@ gimp_main(...) argc++; } else - croak ("internal error (please report): too many main arguments"); + croak (__("internal error (please report): too many main arguments")); } else - croak ("arguments to main not yet supported!"); + croak (__("arguments to main not yet supported!")); gimp_is_initialized = 1; RETVAL = gimp_main (argc, argv); @@ -1519,7 +1520,7 @@ gimp_call_procedure (proc_name, ...) if (trace & TRACE_CALL) { dump_params (i, args, params); - trace_printf (" = [argument error]\n"); + trace_printf (__(" = [argument error]\n")); } goto error; @@ -1535,10 +1536,10 @@ gimp_call_procedure (proc_name, ...) if (i < nparams || j < items) { if (trace & TRACE_CALL) - trace_printf ("[unfinished]\n"); + trace_printf (__("[unfinished]\n")); - sprintf (croak_str, "%s arguments for function '%s'", - i < nparams ? "not enough" : "too many", proc_name); + sprintf (croak_str, __("%s arguments for function '%s'"), + i < nparams ? __("not enough") : __("too many"), proc_name); if (nparams) destroy_params (args, nparams); @@ -1559,9 +1560,9 @@ gimp_call_procedure (proc_name, ...) if (values && values[0].type == PARAM_STATUS) { if (values[0].data.d_status == STATUS_EXECUTION_ERROR) - sprintf (croak_str, "%s: procedural database execution failed", proc_name); + sprintf (croak_str, __("%s: procedural database execution failed"), proc_name); else if (values[0].data.d_status == STATUS_CALLING_ERROR) - sprintf (croak_str, "%s: procedural database execution failed on invalid input arguments", proc_name); + sprintf (croak_str, __("%s: procedural database execution failed on invalid input arguments"), proc_name); else if (values[0].data.d_status == STATUS_SUCCESS) { EXTEND(SP, perl_paramdef_count (return_vals, nvalues-1)); @@ -1577,10 +1578,10 @@ gimp_call_procedure (proc_name, ...) SPAGAIN; } else - sprintf (croak_str, "unsupported status code: %d, fatal error\n", values[0].data.d_status); + sprintf (croak_str, __("unsupported status code: %d, fatal error\n"), values[0].data.d_status); } else - sprintf (croak_str, "gimp didn't return an execution status, fatal error"); + sprintf (croak_str, __("gimp didn't return an execution status, fatal error")); } @@ -1596,7 +1597,7 @@ gimp_call_procedure (proc_name, ...) croak (croak_str); } else - croak ("gimp procedure '%s' not found", proc_name); + croak (__("gimp procedure '%s' not found"), proc_name); } void @@ -1635,7 +1636,7 @@ gimp_install_procedure(name, blurb, help, author, copyright, date, menu_path, im g_free (apd); } else - croak ("params and return_vals must be array refs (even if empty)!"); + croak (__("params and return_vals must be array refs (even if empty)!")); void gimp_uninstall_temp_proc(name) @@ -1783,7 +1784,7 @@ gimp_pixel_rgns_register(...) else if (items == 3) RETVAL = gimp_pixel_rgns_register (3, old_pixelrgn (ST (0)), old_pixelrgn (ST (1)), old_pixelrgn (ST (2))); else - croak ("gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 and report this error"); + croak (__("gimp_pixel_rgns_register supports only 1, 2 or 3 arguments, upgrade to gimp-1.1 and report this error")); OUTPUT: RETVAL @@ -2112,7 +2113,7 @@ gimp_pixel_rgn_data(pr,newdata=0) stride = pr->bpp * newdata->dims[newdata->ndims-2]; if (pr->h != newdata->dims[newdata->ndims-1]) - croak ("pdl height != region height"); + croak (__("pdl height != region height")); for (y = 0, src = newdata->data, dst = pr->data; y < pr->h; @@ -2152,7 +2153,7 @@ gimp_tile_get_data(tile) GTile * tile CODE: need_pdl; - croak ("gimp_tile_get_data is not yet implemented\n"); + croak (__("gimp_tile_get_data is not yet implemented\n")); gimp_tile_ref (tile); gimp_tile_unref (tile, 0); OUTPUT: @@ -2163,7 +2164,7 @@ gimp_tile_set_data(tile,data) GTile * tile SV * data CODE: - croak ("gimp_tile_set_data is not yet implemented\n"); (void *)data; + croak (__("gimp_tile_set_data is not yet implemented\n")); (void *)data; gimp_tile_ref_zero (tile); gimp_tile_unref (tile, 1); @@ -2185,7 +2186,7 @@ gimp_pixel_rgn_data(...) gimp_tile_get_data = 11 gimp_tile_set_data = 12 CODE: - croak ("This module was built without support for PDL."); + croak (__("This module was built without support for PDL.")); #endif @@ -2307,7 +2308,7 @@ _new_pattern_select(dname, ipattern, nameref) CODE: { if (!SvROK (nameref)) - croak ("last argument to gimp_pattern_select_widget must be scalar ref"); + croak (__("last argument to gimp_pattern_select_widget must be scalar ref")); nameref = SvRV (nameref); SvUPGRADE (nameref, SVt_PV); diff --git a/plug-ins/perl/Gimp/Net.pm b/plug-ins/perl/Gimp/Net.pm index ef8f2e1b7c..22aaad945e 100644 --- a/plug-ins/perl/Gimp/Net.pm +++ b/plug-ins/perl/Gimp/Net.pm @@ -15,7 +15,7 @@ use base qw(DynaLoader); use Socket; # IO::Socket is _really_ slow, so don't use it! -use Gimp 'croak'; +use Gimp ('croak','__'); require DynaLoader; @@ -78,9 +78,9 @@ sub gimp_call_procedure { $req="TRCE".args2net(0,$trace_level,@_); print $server_fh pack("N",length($req)).$req; do { - read($server_fh,$len,4) == 4 or die "protocol error"; + read($server_fh,$len,4) == 4 or die "protocol error (3)"; $len=unpack("N",$len); - read($server_fh,$req,abs($len)) == $len or die "protocol error"; + read($server_fh,$req,abs($len)) == $len or die "protocol error (4)"; if ($len<0) { ($req,@args)=net2args(0,$req); print "ignoring callback $req\n"; @@ -97,9 +97,9 @@ sub gimp_call_procedure { $req="EXEC".args2net(0,@_); print $server_fh pack("N",length($req)).$req; do { - read($server_fh,$len,4) == 4 or die "protocol error"; + read($server_fh,$len,4) == 4 or die "protocol error (5)"; $len=unpack("N",$len); - read($server_fh,$req,abs($len)) == $len or die "protocol error"; + read($server_fh,$req,abs($len)) == $len or die "protocol error (6)"; if ($len<0) { ($req,@args)=net2args(0,$req); print "ignoring callback $req\n"; @@ -139,12 +139,12 @@ sub set_trace { sub start_server { my $opt = shift; $opt = $Gimp::spawn_opts unless $opt; - print "trying to start gimp with options \"$opt\"\n" if $Gimp::verbose; + print __"trying to start gimp with options \"$opt\"\n" if $Gimp::verbose; $server_fh=local *SERVER_FH; my $gimp_fh=local *CLIENT_FH; socketpair $server_fh,$gimp_fh,AF_UNIX,SOCK_STREAM,PF_UNSPEC or socketpair $server_fh,$gimp_fh,AF_LOCAL,SOCK_STREAM,PF_UNSPEC - or croak "unable to create socketpair for gimp communications: $!"; + or croak __"unable to create socketpair for gimp communications: $!"; # do it here so it i done only once require Gimp::Config; @@ -178,7 +178,7 @@ sub start_server { } exit(255); } else { - croak "unable to fork: $!"; + croak __"unable to fork: $!"; } } @@ -222,27 +222,27 @@ sub gimp_init { } else { $server_fh = try_connect (""); } - defined $server_fh or croak "could not connect to the gimp server (make sure Net-Server is running)"; + defined $server_fh or croak __"could not connect to the gimp server (make sure Net-Server is running)"; { my $fh = select $server_fh; $|=1; select $fh } my @r = response; - die "expected perl-server at other end of socket, got @r\n" + die __"expected perl-server at other end of socket, got @r\n" unless $r[0] eq "PERL-SERVER"; shift @r; - die "expected protocol version $Gimp::_PROT_VERSION, but server uses $r[0]\n" + die __"expected protocol version $Gimp::_PROT_VERSION, but server uses $r[0]\n" unless $r[0] eq $Gimp::_PROT_VERSION; shift @r; for(@r) { if($_ eq "AUTH") { - die "server requests authorization, but no authorization available\n" + die __"server requests authorization, but no authorization available\n" unless $auth; my $req = "AUTH".$auth; print $server_fh pack("N",length($req)).$req; my @r = response; - die "authorization failed: $r[1]\n" unless $r[0]; - print "authorization ok, but: $r[1]\n" if $Gimp::verbose and $r[1]; + die __"authorization failed: $r[1]\n" unless $r[0]; + print __"authorization ok, but: $r[1]\n" if $Gimp::verbose and $r[1]; } } diff --git a/plug-ins/perl/Gimp/PDL.pm b/plug-ins/perl/Gimp/PDL.pm index cb105b14eb..a19c74f86e 100644 --- a/plug-ins/perl/Gimp/PDL.pm +++ b/plug-ins/perl/Gimp/PDL.pm @@ -1,8 +1,8 @@ package Gimp::PDL; -use Gimp (); +use Gimp ('__'); -warn "use'ing Gimp::PDL is no longer necessary, please remove it\n"; +warn __"use'ing Gimp::PDL is no longer necessary, please remove it!\n"; 1; __END__ diff --git a/plug-ins/perl/Gimp/UI.pm b/plug-ins/perl/Gimp/UI.pm index d28178836c..bcf60866ae 100644 --- a/plug-ins/perl/Gimp/UI.pm +++ b/plug-ins/perl/Gimp/UI.pm @@ -1,6 +1,6 @@ package Gimp::UI; -use Gimp (); +use Gimp ('__'); use Gimp::Fu; use Gtk; @@ -80,7 +80,7 @@ sub new($$$$) { if (@items) { $$var=$items[0]->[1]; } else { - my $item = new Gtk::MenuItem "(none)"; + my $item = new Gtk::MenuItem __"(none)"; $menu->append($item); $$var=undef; } @@ -91,6 +91,7 @@ sub new($$$$) { package Gimp::UI::PreviewSelect; use Gtk; +use Gimp '__'; use base 'Gtk::Button'; # this is an utter HACK for the braindamanged gtk (NOT Gtk!) @@ -170,7 +171,7 @@ sub GTK_OBJECT_INIT { }); $s->add_with_viewport ($l); - my $button = new Gtk::Button "OK"; + my $button = new Gtk::Button __"OK"; signal_connect $button "clicked", sub { hide $w; if($l->selection) { @@ -183,7 +184,7 @@ sub GTK_OBJECT_INIT { grab_default $button; show $button; - $button = new Gtk::Button "Cancel"; + $button = new Gtk::Button __"Cancel"; signal_connect $button "clicked", sub {hide $w}; $w->action_area->pack_start($button,1,1,0); can_default $button 1; @@ -195,9 +196,10 @@ sub GTK_OBJECT_INIT { package Gimp::UI::PatternSelect; use Gtk; +use Gimp '__'; use base 'Gimp::UI::PreviewSelect'; -sub get_title { "Pattern Selection Dialog" } +sub get_title { __"Pattern Selection Dialog" } sub get_list { Gimp->patterns_list } sub new_preview { @@ -243,9 +245,10 @@ sub new { package Gimp::UI::BrushSelect; use Gtk; +use Gimp '__'; use base 'Gimp::UI::PreviewSelect'; -sub get_title { "Brush Selection Dialog" } +sub get_title { __"Brush Selection Dialog" } sub get_list { Gimp->brushes_list } sub new_preview { @@ -287,8 +290,9 @@ package Gimp::UI::GradientSelect; use Gtk; use base 'Gimp::UI::PreviewSelect'; +use Gimp '__'; -sub get_title { "Gradient Selection Dialog" } +sub get_title { __"Gradient Selection Dialog" } sub get_list { keys %gradients } sub new_preview { @@ -314,6 +318,7 @@ package Gimp::UI::ColorSelectButton; use strict; use vars qw($VERSION @ISA); +use Gimp '__'; use Gtk; @ISA = qw(Gtk::Button); @@ -411,7 +416,7 @@ sub cb_color_button { return; } - my $cs_window=new Gtk::ColorSelectionDialog("Color"); + my $cs_window=new Gtk::ColorSelectionDialog(__"Color"); $cs_window->colorsel->set_color(map($_*1/255,@{$color_button->{_color}})); $cs_window->show(); $cs_window->ok_button->signal_connect("clicked", @@ -505,21 +510,24 @@ sub help_window(\$$$) { my($helpwin,$blurb,$help)=@_; unless ($$helpwin) { $$helpwin = new Gtk::Dialog; - $$helpwin->set_title("Help for ".$Gimp::function); + $$helpwin->set_title(_("Help for ").$Gimp::function); my($font,$b); $b = new Gtk::Text; $b->set_editable (0); $b->set_word_wrap (1); - $font = load Gtk::Gdk::Font "9x15bold"; - $font = fontset_load Gtk::Gdk::Font "-*-courier-medium-r-normal--*-120-*-*-*-*-*" unless $font; + $font = load Gtk::Gdk::Font __"9x15bold"; + $font = fontset_load Gtk::Gdk::Font __"-*-courier-medium-r-normal--*-120-*-*-*-*-*" unless $font; $font = $b->style->font unless $font; - $$helpwin->vbox->add($b); - $b->insert($font,$b->style->fg(-normal),undef,"BLURB:\n\n$blurb\n\nHELP:\n\n$help"); + my $cs = new Gtk::ScrolledWindow undef,undef; + $cs->set_policy(-automatic,-automatic); + $cs->add($b); + $$helpwin->vbox->add($cs); + $b->insert($font,$b->style->fg(-normal),undef,__"BLURB:\n\n$blurb\n\nHELP:\n\n$help"); $b->set_usize($font->string_width('M')*80,($font->ascent+$font->descent)*26); - my $button = new Gtk::Button "OK"; + my $button = new Gtk::Button __"OK"; signal_connect $button "clicked",sub { hide $$helpwin }; $$helpwin->action_area->add($button); @@ -530,7 +538,7 @@ sub help_window(\$$$) { my $pod = new Gimp::Pod; my $text = $pod->format; if ($text) { - $b->insert($font,$b->style->fg(-normal),undef,"\n\nEMBEDDED POD DOCUMENTATION:\n\n"); + $b->insert($font,$b->style->fg(-normal),undef,__"\n\nEMBEDDED POD DOCUMENTATION:\n\n"); $b->insert($font,$b->style->fg(-normal),undef,$text); } }); @@ -606,15 +614,15 @@ sub interact($$$$@) { &new_PF_STRING; } elsif($type == PF_FONT) { - my $fs=new Gtk::FontSelectionDialog "Font Selection Dialog ($desc)"; - my $def = "-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1"; + my $fs=new Gtk::FontSelectionDialog __"Font Selection Dialog ($desc)"; + my $def = __"-*-helvetica-medium-r-normal-*-34-*-*-*-p-*-iso8859-1"; my $val; my $l=new Gtk::Label "!error!"; my $setval = sub { $val=$_[0]; unless (defined $val && $fs->set_font_name ($val)) { - warn "Illegal default font description for $function: $val\n" if defined $val; + warn __"Illegal default font description for $function: $val\n" if defined $val; $val=$def; $fs->set_font_name ($val); } @@ -662,14 +670,14 @@ sub interact($$$$@) { signal_connect $c "clicked", sub { $b->set('color', "@{Gimp::Palette->get_foreground}"); }; - set_tip $t $c,"get current foreground colour from the gimp"; + set_tip $t $c,__"get current foreground colour from the gimp"; $a->pack_start ($c,1,1,0); my $d = new Gtk::Button "BG"; signal_connect $d "clicked", sub { $b->set('color', "@{Gimp::Palette->get_background}"); }; - set_tip $t $d,"get current background colour from the gimp"; + set_tip $t $d,__"get current background colour from the gimp"; $a->pack_start ($d,1,1,0); } elsif($type == PF_TOGGLE) { @@ -738,7 +746,7 @@ sub interact($$$$@) { if ($gimp_10) { &new_PF_STRING; } else { - $a=new Gimp::UI::PatternSelect -active => defined $value ? $value : (Gimp->gradients_get_pattern)[0]; + $a=new Gimp::UI::PatternSelect -active => defined $value ? $value : (Gimp->patterns_get_pattern)[0]; push(@setvals,sub{$a->set('active',$_[0])}); push(@getvals,sub{$a->get('active')}); } @@ -747,7 +755,7 @@ sub interact($$$$@) { if ($gimp_10) { &new_PF_STRING; } else { - $a=new Gimp::UI::BrushSelect -active => defined $value ? $value : (Gimp->gradients_get_brush)[0]; + $a=new Gimp::UI::BrushSelect -active => defined $value ? $value : (Gimp->brushes_get_brush)[0]; push(@setvals,sub{$a->set('active',$_[0])}); push(@getvals,sub{$a->get('active')}); } @@ -756,7 +764,7 @@ sub interact($$$$@) { if ($gimp_10) { &new_PF_STRING; } else { - $a=new Gimp::UI::GradientSelect -active => defined $value ? $value : (Gimp->gradients_get_active)[0]; + $a=new Gimp::UI::GradientSelect -active => defined $value ? $value : (Gimp->gimp_gradients_get_active)[0]; push(@setvals,sub{$a->set('active',$_[0])}); push(@getvals,sub{$a->get('active')}); } @@ -772,7 +780,7 @@ sub interact($$$$@) { my $s = $a; $a = new Gtk::HBox 0,5; $a->add ($s); - my $b = new Gtk::Button "Browse"; + my $b = new Gtk::Button __"Browse"; $a->add ($b); my $f = new Gtk::FileSelection $desc; $b->signal_connect (clicked => sub { $f->set_filename ($s->get_text); $f->show_all }); @@ -802,14 +810,14 @@ sub interact($$$$@) { my $buttons = new Gtk::HBox 1,5; $h->add($buttons); - my $load = new Gtk::Button "Load"; $buttons->add($load); - my $save = new Gtk::Button "Save"; $buttons->add($save); - my $edit = new Gtk::Button "Edit"; $buttons->add($edit); + my $load = new Gtk::Button __"Load"; $buttons->add($load); + my $save = new Gtk::Button __"Save"; $buttons->add($save); + my $edit = new Gtk::Button __"Edit"; $buttons->add($edit); $edit->signal_connect(clicked => sub { my $editor = $ENV{EDITOR} || "vi"; my $tmp = Gimp->temp_name("txt"); - open TMP,">$tmp" or die "FATAL: unable to create $tmp: $!\n"; print TMP &$gv; close TMP; + open TMP,">$tmp" or die __"FATAL: unable to create $tmp: $!\n"; print TMP &$gv; close TMP; $w->hide; main_iteration Gtk; system ('xterm','-T',"$editor: $name",'-e',$editor,$tmp); @@ -817,13 +825,13 @@ sub interact($$$$@) { if (open TMP,"<$tmp") { local $/; &$sv(scalar); close TMP; } else { - Gimp->message("unable to read temporary file $tmp: $!"); + Gimp->message(__"unable to read temporary file $tmp: $!"); } }); my $filename = ($e{prefix} || eval { Gimp->directory } || ".") . "/"; - my $f = new Gtk::FileSelection "Fileselector for $name"; + my $f = new Gtk::FileSelection __"Fileselector for $name"; $f->set_filename($filename); $f->cancel_button->signal_connect (clicked => sub { $f->hide }); my $lf =sub { @@ -833,7 +841,7 @@ sub interact($$$$@) { local $/; &$sv(scalar); close TMP; } else { - Gimp->message("unable to read '$fn': $!"); + Gimp->message(__"unable to read '$fn': $!"); } }; my $sf =sub { @@ -843,18 +851,18 @@ sub interact($$$$@) { print TMP &$gv; close TMP; } else { - Gimp->message("unable to create '$fn': $!"); + Gimp->message(__"unable to create '$fn': $!"); } }; my $lshandle; $load->signal_connect (clicked => sub { - $f->set_title("Load $name"); + $f->set_title(__"Load $name"); $f->ok_button->signal_disconnect($lshandle) if $lshandle; $lshandle=$f->ok_button->signal_connect (clicked => $lf); $f->show_all; }); $save->signal_connect (clicked => sub { - $f->set_title("Save $name"); + $f->set_title(__"Save $name"); $f->ok_button->signal_disconnect($lshandle) if $lshandle; $lshandle=$f->ok_button->signal_connect (clicked => $sf); $f->show_all; @@ -864,7 +872,7 @@ sub interact($$$$@) { push @getvals,$gv; } else { - $label="Unsupported argumenttype $type"; + $label=__"Unsupported argumenttype $type"; push(@setvals,sub{}); push(@getvals,sub{$value}); } @@ -883,41 +891,41 @@ sub interact($$$$@) { $res++; } - $button = new Gtk::Button "Help"; + $button = new Gtk::Button __"Help"; $g->attach($button,0,1,$res,$res+1,{},{},4,2); signal_connect $button "clicked", sub { help_window($helpwin,$blurb,$help) }; my $v=new Gtk::HBox 0,5; $g->attach($v,1,2,$res,$res+1,{},{},4,2); - $button = new Gtk::Button "Defaults"; + $button = new Gtk::Button __"Defaults"; signal_connect $button "clicked", sub { for my $i (0..$#defaults) { $setvals[$i]->($defaults[$i]); } }; - set_tip $t $button,"Reset all values to their default"; + set_tip $t $button,__"Reset all values to their default"; $v->add($button); - $button = new Gtk::Button "Previous"; + $button = new Gtk::Button __"Previous"; signal_connect $button "clicked", sub { for my $i (0..$#lastvals) { $setvals[$i]->($lastvals[$i]); } }; $v->add($button); - set_tip $t $button,"Restore values to the previous ones"; + set_tip $t $button,__"Restore values to the previous ones"; signal_connect $w "destroy", sub {main_quit Gtk}; - $button = new Gtk::Button "OK"; + $button = new Gtk::Button __"OK"; signal_connect $button "clicked", sub {$res = 1; hide $w; main_quit Gtk}; $w->action_area->pack_start($button,1,1,0); can_default $button 1; grab_default $button; add $accel 0xFF0D, [], [], $button, "clicked"; - $button = new Gtk::Button "Cancel"; + $button = new Gtk::Button __"Cancel"; signal_connect $button "clicked", sub {hide $w; main_quit Gtk}; $w->action_area->pack_start($button,1,1,0); can_default $button 1; diff --git a/plug-ins/perl/Gimp/Util.pm b/plug-ins/perl/Gimp/Util.pm index 859a627944..9bb168bc81 100644 --- a/plug-ins/perl/Gimp/Util.pm +++ b/plug-ins/perl/Gimp/Util.pm @@ -127,8 +127,8 @@ sub text_draw { my ($bg_layer,$text_layer); my $tcol; # temp. color - warn ("text string is empty") if ($text eq ""); - warn ("no font specified, using default") if ($font eq ""); + warn __"text string is empty" if $text eq ""; + warn __"no font specified, using default" if $font eq ""; $font = "Helvetica" if ($font eq ""); $tcol = gimp_palette_get_foreground (); @@ -177,8 +177,8 @@ sub image_create_text { my $bg_layer; my $image; - warn ("text string is empty") if ($text eq ""); - warn ("no font specified, using default") if ($font eq ""); + warn (__"text string is empty") if ($text eq ""); + warn (__"no font specified, using default") if ($font eq ""); $font = "Helvetica" if ($font eq ""); # create an image. We'll just set whatever size here because we want # to resize the image when we figure out how big the text is. @@ -372,5 +372,3 @@ Various, version 1.000 written mainly by Tels (http://bloodgate.com/). The autho of the Gimp-Perl extension (contact him to include new functions) is Marc Lehmann - - diff --git a/plug-ins/perl/MANIFEST b/plug-ins/perl/MANIFEST index 3d73baf96e..da25e81bf2 100644 --- a/plug-ins/perl/MANIFEST +++ b/plug-ins/perl/MANIFEST @@ -21,16 +21,17 @@ logo.xpm extradefs.h gppport.h Perl-Server +configure t/load.t t/loadlib.t t/run.t -etc/configure -etc/configure.in -etc/aclocal.m4 -etc/acconfig.h -etc/config.h.in -etc/config.pl.in -etc/configure.frag +configure.in +aclocal.m4 +acconfig.h +config.h.in +config.pl.in +configure.frag +perl-intl.h Gimp/Makefile.PL Gimp/Lib.xs Gimp/Lib.pm @@ -115,3 +116,5 @@ examples/burst examples/map_to_gradient examples/fire examples/povray +pxgettext +po/gimp-perl.pot diff --git a/plug-ins/perl/Makefile.PL b/plug-ins/perl/Makefile.PL index ae7cf62fd3..587595ea7d 100644 --- a/plug-ins/perl/Makefile.PL +++ b/plug-ins/perl/Makefile.PL @@ -31,7 +31,7 @@ if ($ARGV[0] ne "--writemakefile") { $ENV{PERL}=$Config{perlpath}; $ENV{MAKEFILE_PL}=$0; $ENV{IN_GIMP}=0; - exit system("./etc/configure",@ARGV)>>8; + exit system("./configure",@ARGV)>>8; } else { shift; local $do_config_msg = 1; @@ -190,8 +190,19 @@ force_uninstall_from_perldirs :: force_uninstall_from_sitedirs :: \$(PERL) -MExtUtils::Install -e 'uninstall(\$\$ARGV[0],1,0)' ".$self->catfile('$(SITEARCHEXP)','auto','$(FULLEXT)','.packlist')." +# generate tags file tags: . ctags --lang=c `find . -name '*.xs' -print` + +# run autoconf (&c) +autoconf: + aclocal; autoheader; autoconf + +# merge messages into potfile +msgmerge: + etc/pxgettext `find . -name '*.pm' -o -name '*.xs' -o -path './examples/*'` | \\ + msgmerge -w 83 etc/po/gimp-perl.pot - >gimp-perl.pot~ && \\ + mv gimp-perl.pot~ etc/po/gimp-perl.pot "; } @@ -260,7 +271,7 @@ WriteMakefile( 'Gimp/Module.pm' => '$(INST_LIBDIR)/Gimp/Module.pm', 'Gimp/Config.pm' => '$(INST_LIBDIR)/Gimp/Config.pm', }, - 'LIBS' => [''], + 'LIBS' => ['-lintl'], 'INC' => "$INC1 $GIMP_INC_NOUI $CPPFLAGS $CFLAGS", 'DEFINE' => "$DEFINE1 $DEFS", 'EXE_FILES' => [qw(scm2perl scm2scm gimpdoc xcftopnm embedxpm)], diff --git a/plug-ins/perl/Module/Module.xs b/plug-ins/perl/Module/Module.xs index 7e7858bff0..c8d32f9cbc 100644 --- a/plug-ins/perl/Module/Module.xs +++ b/plug-ins/perl/Module/Module.xs @@ -1,4 +1,5 @@ #include "config.h" +#include "../perl-intl.h" /* FIXME */ /* sys/param.h is redefining these! */ diff --git a/plug-ins/perl/Net/Net.xs b/plug-ins/perl/Net/Net.xs index 2bbc9f4e0d..07ab92db83 100644 --- a/plug-ins/perl/Net/Net.xs +++ b/plug-ins/perl/Net/Net.xs @@ -1,4 +1,5 @@ #include "config.h" +#include "../perl-intl.h" /* dunno where this comes from */ #undef VOIDUSED @@ -37,7 +38,7 @@ static void need_pdl (void) { /* Get pointer to structure of core shared C routines */ if (!(CoreSV = perl_get_sv("PDL::SHARE",FALSE))) - Perl_croak("gimp-perl-pixel functions require the PDL::Core module"); + Perl_croak(__("gimp-perl-pixel functions require the PDL::Core module")); PDL = (Core*) SvIV(CoreSV); } @@ -70,10 +71,10 @@ static void destroy_object (SV *sv) } } else - croak ("Internal error: Gimp::Net #101, please report!"); + croak (__("Internal error: Gimp::Net #101, please report!")); } else - croak ("Internal error: Gimp::Net #100, please report!"); + croak (__("Internal error: Gimp::Net #100, please report!")); } /* allocate this much as initial length */ @@ -134,7 +135,7 @@ static void sv2net (int deobjectify, SV *s, SV *sv) else if (SvTYPE(rv) == SVt_PVMG) sv2net (deobjectify, s, rv); else - croak ("Internal error: unable to convert reference in sv2net, please report!"); + croak (__("Internal error: unable to convert reference in sv2net, please report!")); } else if (SvOK(sv)) { @@ -189,7 +190,7 @@ static SV *net2sv (int objectify, char **_s) case 'b': sscanf (s, "%x:%n", &ui, &n); s += n; if (ui >= sizeof str) - croak ("Internal error: stashname too long, please report!"); + croak (__("Internal error: stashname too long, please report!")); memcpy (str, s, ui); s += ui; str[ui] = 0; @@ -202,7 +203,7 @@ static SV *net2sv (int objectify, char **_s) sv = (SV*)g_hash_table_lookup (object_cache, (id=l,&id)); if (!sv) - croak ("Internal error: asked to deobjectify an object not in the cache, please report!"); + croak (__("Internal error: asked to deobjectify an object not in the cache, please report!")); } else sv = net2sv (objectify, &s); @@ -222,7 +223,7 @@ static SV *net2sv (int objectify, char **_s) break; default: - croak ("Internal error: unable to handle argtype '%c' in net2sv, please report!", s[-1]); + croak (__("Internal error: unable to handle argtype '%c' in net2sv, please report!"), s[-1]); } *_s = s; @@ -248,7 +249,6 @@ args2net(deobjectify,...) for (index = 1; index < items; index++) sv2net (deobjectify, RETVAL, ST(index)); - /*printf (">>>>%s\n",SvPV_nolen(RETVAL));*//*D*/ OUTPUT: RETVAL @@ -258,7 +258,6 @@ net2args(objectify,s) char * s PPCODE: - /*printf ("<<<<%s\n",s);*//*D*/ if (objectify) init_object_cache; /* this depends on a trailing zero! */ diff --git a/plug-ins/perl/Perl-Server b/plug-ins/perl/Perl-Server index a798aab489..f192e3b398 100755 --- a/plug-ins/perl/Perl-Server +++ b/plug-ins/perl/Perl-Server @@ -15,7 +15,7 @@ use strict; use vars qw($use_unix $use_tcp $trace_res $server_quit $max_pkt $unix $tcp $ps_flags $auth @authorized $exclusive $rm $saved_rm %stats); # the '' might be required (i.e. no ()). why?? -use Gimp (); +use Gimp ('__'); use Gimp::Net (); Gimp::set_trace(\$trace_res); @@ -106,14 +106,14 @@ sub handle_request($) { print $fh pack("N",length($data)).$data; Gimp::set_trace(0); } elsif ($req eq "QUIT") { - slog "received QUIT request"; + slog __"received QUIT request"; $server_quit = 1; } elsif($req eq "AUTH") { - $data=Gimp::Net::args2net(0,1,"authorization unnecessary"); + $data=Gimp::Net::args2net(0,1,__"authorization unnecessary"); print $fh pack("N",length($data)).$data; } elsif($req eq "LOCK") { my($lock,$shared)=unpack("N*",$data); - slog "WARNING: shared locking requested but not implemented" if $shared; + slog __"WARNING: shared locking requested but not implemented" if $shared; if($lock) { unless($exclusive) { $saved_rm=$rm; @@ -125,12 +125,12 @@ sub handle_request($) { $exclusive--; $rm = $saved_rm unless $exclusive; } else { - slog "WARNING: client tried to unlock without holding a lock"; + slog __"WARNING: client tried to unlock without holding a lock"; } } } else { print $fh pack("N",0); - slog "illegal command received, aborting connection"; + slog __"illegal command received, aborting connection"; return 0; } } else { @@ -141,7 +141,7 @@ sub handle_request($) { $authorized[fileno($fh)]=1; } else { $ok=0; - $msg="wrong authorization, aborting connection"; + $msg=__"wrong authorization, aborting connection"; slog $msg; sleep 5; # safety measure } @@ -150,7 +150,7 @@ sub handle_request($) { return $ok; } else { print $fh pack("N",0); - slog "unauthorized command received, aborting connection"; + slog __"unauthorized command received, aborting connection"; return 0; } } @@ -165,7 +165,7 @@ sub extension_perl_server { if ($run_mode == &Gimp::RUN_NONINTERACTIVE) { if ($ps_flags & &Gimp::_PS_FLAG_BATCH) { my($fh) = local *FH; - open $fh,"+<&$extra" or die "unable to open Gimp::Net communications socket\n"; + open $fh,"+<&$extra" or die __"unable to open Gimp::Net communications socket\n"; select $fh; $|=1; select STDOUT; reply $fh,"PERL-SERVER",$Gimp::_PROT_VERSION; while(!$server_quit and !eof($fh)) { @@ -185,7 +185,7 @@ sub extension_perl_server { my $host = $ENV{'GIMP_HOST'}; $auth = $host=~s/^(.*)\@// ? $1 : undef; # get authorization - slog "server version $Gimp::VERSION started".($auth ? ", authorization required" : ""); + slog __"server version $Gimp::VERSION started".($auth ? __", authorization required" : ""); $SIG{PIPE}='IGNORE'; # may not work, since libgimp (eech) overwrites it. my($unix_path)=$Gimp::Net::default_unix_dir.$Gimp::Net::default_unix_sock; @@ -193,14 +193,14 @@ sub extension_perl_server { if ($host ne "") { if ($host=~s{^spawn/}{}) { - die "invalid GIMP_HOST: 'spawn' is not a valid connection method for the server"; + die __"invalid GIMP_HOST: 'spawn' is not a valid connection method for the server"; } elsif ($host=~s{^unix/}{/}) { $unix = local *FH; socket($unix,AF_UNIX,SOCK_STREAM,PF_UNSPEC) && bind($unix,sockaddr_un $host) && listen($unix,5) - or die "unable to create listening unix socket: $!\n"; - slog "accepting connections in $host"; + or die __"unable to create listening unix socket: $!\n"; + slog __"accepting connections in $host"; vec($rm,fileno($unix),1)=1; } else { $host=~s{^tcp/}{}; @@ -211,8 +211,8 @@ sub extension_perl_server { && bind($tcp,sockaddr_in $port,INADDR_ANY) && setsockopt($tcp,SOL_SOCKET,SO_REUSEADDR,1) && listen($tcp,5) - or die "unable to create listening tcp socket: $!\n"; - slog "accepting connections on port $port"; + or die __"unable to create listening tcp socket: $!\n"; + slog __"accepting connections on port $port"; vec($rm,fileno($tcp),1)=1; } } else { @@ -224,8 +224,8 @@ sub extension_perl_server { socket($unix,AF_UNIX,SOCK_STREAM,PF_UNSPEC) && bind($unix,sockaddr_un $unix_path) && listen($unix,5) - or die "unable to create listening unix socket: $!\n"; - slog "accepting connections on $unix_path"; + or die __"unable to create listening unix socket: $!\n"; + slog __"accepting connections on $unix_path"; vec($rm,fileno($unix),1)=1; } if ($use_tcp && $auth) { @@ -234,13 +234,13 @@ sub extension_perl_server { && bind($tcp,sockaddr_in $Gimp::Net::default_tcp_port,INADDR_ANY) && setsockopt($tcp,SOL_SOCKET,SO_REUSEADDR,1) && listen($tcp,5) - or die "unable to create listening tcp socket: $!\n"; - slog "accepting connections on port $Gimp::Net::default_tcp_port"; + or die __"unable to create listening tcp socket: $!\n"; + slog __"accepting connections on port $Gimp::Net::default_tcp_port"; vec($rm,fileno($tcp),1)=1; } } - !$tcp || $auth or die "authorization required for tcp connections"; + !$tcp || $auth or die __"authorization required for tcp connections"; sub new_connection { my $fh = shift; @@ -257,15 +257,15 @@ sub extension_perl_server { if(select($r=$rm,undef,undef,undef)>0) { if ($tcp && vec($r,fileno($tcp),1)) { my $h = local *FH; - my ($port,$host) = sockaddr_in (accept ($h,$tcp)) or die "unable to accept tcp connection: $!\n"; + my ($port,$host) = sockaddr_in (accept ($h,$tcp)) or die __"unable to accept tcp connection: $!\n"; new_connection($h); - slog "accepted tcp connection from ",inet_ntoa($host),":$port"; + slog __"accepted tcp connection from ",inet_ntoa($host),":$port"; } if ($unix && vec($r,fileno($unix),1)) { my $h = local *FH; - accept ($h,$unix) or die "unable to accept unix connection: $!\n"; + accept ($h,$unix) or die __"unable to accept unix connection: $!\n"; new_connection($h); - slog("accepted unix connection"); + slog __"accepted unix connection"; } for $f (keys(%handles)) { if(vec($r,$f,1)) { @@ -273,11 +273,11 @@ sub extension_perl_server { if(handle_request($fh)) { $stats{$f}[0]++; } else { - slog "closing connection ",$f," ($stats{$f}[0] requests in ",time-$stats{$f}[1]," seconds)"; + slog sprintf __"closing connection %d (%d requests in %f seconds)", $f, $stats{$f}[0], time-$stats{$f}[1]; if ($exclusive) { $rm = $saved_rm; $exclusive = 0; - slog "WARNING: client disconnected while holding an active lock\n"; + slog __"WARNING: client disconnected while holding an active lock\n"; } vec($rm,$f,1)=0; delete $handles{$f}; @@ -289,7 +289,7 @@ sub extension_perl_server { } } - slog "server going down..."; + slog __"server going down..."; if ($use_tcp) { undef $tcp; } @@ -304,7 +304,7 @@ sub query { Gimp->install_procedure("extension_perl_server", "Start the Gimp-Perl Server", "This is the server for plug-ins written using the Gimp::Net module", "Marc Lehmann ", "Marc Lehmann", "1998-07-22", - "/Xtns/Perl/Server", "*",&Gimp::PROC_EXTENSION, + __"/Xtns/Perl/Server", "*",&Gimp::PROC_EXTENSION, [ [&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"], [&Gimp::PARAM_INT32, "flags", "internal flags (must be 0)"], diff --git a/plug-ins/perl/etc/acconfig.h b/plug-ins/perl/etc/acconfig.h deleted file mode 100644 index b870f4438e..0000000000 --- a/plug-ins/perl/etc/acconfig.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the header file. */ -#undef HAVE_LIBGIMP_GIMP_H - -/* Define if you have the glib library (-lglib). */ -#undef HAVE_LIBGLIB - -/* Define if you don't have gimp_get_data_size. */ -#undef HAVE_GET_DATA_SIZE - -/* Define if we have DIVIDE_MODE. */ -#undef HAVE_DIVIDE_MODE - -/* Define if we have _exit(2). */ -#undef HAVE__EXIT - diff --git a/plug-ins/perl/etc/aclocal.m4 b/plug-ins/perl/etc/aclocal.m4 deleted file mode 100644 index d236deebf8..0000000000 --- a/plug-ins/perl/etc/aclocal.m4 +++ /dev/null @@ -1,376 +0,0 @@ -dnl aclocal.m4 generated automatically by aclocal 1.4 - -dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without -dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A -dnl PARTICULAR PURPOSE. - -# Configure paths for GIMP -# Manish Singh 98-6-11 -# Shamelessly stolen from Owen Taylor - -dnl AM_PATH_GIMP([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) -dnl Test for GIMP, and define GIMP_CFLAGS and GIMP_LIBS -dnl -AC_DEFUN(AM_PATH_GIMP, -[dnl -dnl Get the cflags and libraries from the gimptool script -dnl -AC_ARG_WITH(gimp-prefix,[ --with-gimp-prefix=PFX Prefix where GIMP is installed (optional)], - gimptool_prefix="$withval", gimptool_prefix="") -AC_ARG_WITH(gimp-exec-prefix,[ --with-gimp-exec-prefix=PFX Exec prefix where GIMP is installed (optional)], - gimptool_exec_prefix="$withval", gimptool_exec_prefix="") -AC_ARG_ENABLE(gimptest, [ --disable-gimptest Do not try to compile and run a test GIMP program], - , enable_gimptest=yes) - - if test x$gimptool_exec_prefix != x ; then - gimptool_args="$gimptool_args --exec-prefix=$gimptool_exec_prefix" - if test x${GIMPTOOL+set} != xset ; then - GIMPTOOL=$gimptool_exec_prefix/bin/gimptool - fi - fi - if test x$gimptool_prefix != x ; then - gimptool_args="$gimptool_args --prefix=$gimptool_prefix" - if test x${GIMPTOOL+set} != xset ; then - GIMPTOOL=$gimptool_prefix/bin/gimptool - fi - fi - - AC_PATH_PROG(GIMPTOOL, gimptool, no) - min_gimp_version=ifelse([$1], ,1.0.0,$1) - AC_MSG_CHECKING(for GIMP - version >= $min_gimp_version) - no_gimp="" - if test "$GIMPTOOL" = "no" ; then - no_gimp=yes - else - GIMP_CFLAGS=`$GIMPTOOL $gimptool_args --cflags` - GIMP_LIBS=`$GIMPTOOL $gimptool_args --libs` - - GIMP_CFLAGS_NOUI=`$GIMPTOOL $gimptool_args --cflags-noui` - noui_test=`echo $GIMP_CFLAGS_NOUI | sed 's/^\(Usage\).*/\1/'` - if test "$noui_test" = "Usage" ; then - GIMP_CFLAGS_NOUI=$GIMP_CFLAGS - GIMP_LIBS_NOUI=$GIMP_LIBS - else - GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` - fi - - gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - gimptool_micro_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_gimptest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GIMP_CFLAGS" - LIBS="$LIBS $GIMP_LIBS" -dnl -dnl Now check if the installed GIMP is sufficiently new. (Also sanity -dnl checks the results of gimptool to some extent -dnl - rm -f conf.gimptest - AC_TRY_RUN([ -#include -#include -#include - -GPlugInInfo PLUG_IN_INFO = -{ - NULL, /* init_proc */ - NULL, /* quit_proc */ - NULL, /* query_proc */ - NULL /* run_proc */ -}; - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gimptest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gimp_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gimp_version"); - exit(1); - } - - if (($gimptool_major_version > major) || - (($gimptool_major_version == major) && ($gimptool_minor_version > minor)) || - (($gimptool_major_version == major) && ($gimptool_minor_version == minor) && ($gimptool_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'gimptool --version' returned %d.%d.%d, but the minimum version\n", $gimptool_major_version, $gimptool_minor_version, $gimptool_micro_version); - printf("*** of GIMP required is %d.%d.%d. If gimptool is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If gimptool was wrong, set the environment variable GIMPTOOL\n"); - printf("*** to point to the correct copy of gimptool, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - -],, no_gimp=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gimp" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GIMPTOOL" = "no" ; then - echo "*** The gimptool script installed by GIMP could not be found" - echo "*** If GIMP was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GIMPTOOL environment variable to the" - echo "*** full path to gimptool." - else - if test -f conf.gimptest ; then - : - else - echo "*** Could not run GIMP test program, checking why..." - CFLAGS="$CFLAGS $GIMP_CFLAGS" - LIBS="$LIBS $GIMP_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return 0; ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GIMP or finding the wrong" - echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GIMP was incorrectly installed" - echo "*** or that you have moved GIMP since it was installed. In the latter case, you" - echo "*** may want to edit the gimptool script: $GIMPTOOL" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GIMP_CFLAGS="" - GIMP_LIBS="" - GIMP_CFLAGS_NOUI="" - GIMP_LIBS_NOUI="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GIMP_CFLAGS) - AC_SUBST(GIMP_LIBS) - AC_SUBST(GIMP_CFLAGS_NOUI) - AC_SUBST(GIMP_LIBS_NOUI) - rm -f conf.gimptest -]) - -# Configure paths for GLIB -# Owen Taylor 97-11-3 - -dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) -dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or -dnl gthread is specified in MODULES, pass to glib-config -dnl -AC_DEFUN(AM_PATH_GLIB, -[dnl -dnl Get the cflags and libraries from the glib-config script -dnl -AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], - glib_config_prefix="$withval", glib_config_prefix="") -AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], - glib_config_exec_prefix="$withval", glib_config_exec_prefix="") -AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], - , enable_glibtest=yes) - - if test x$glib_config_exec_prefix != x ; then - glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config - fi - fi - if test x$glib_config_prefix != x ; then - glib_config_args="$glib_config_args --prefix=$glib_config_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_prefix/bin/glib-config - fi - fi - - for module in . $4 - do - case "$module" in - gmodule) - glib_config_args="$glib_config_args gmodule" - ;; - gthread) - glib_config_args="$glib_config_args gthread" - ;; - esac - done - - AC_PATH_PROG(GLIB_CONFIG, glib-config, no) - min_glib_version=ifelse([$1], ,0.99.7,$1) - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) - no_glib="" - if test "$GLIB_CONFIG" = "no" ; then - no_glib=yes - else - GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` - GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` - glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_glibtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" -dnl -dnl Now check if the installed GLIB is sufficiently new. (Also sanity -dnl checks the results of glib-config to some extent -dnl - rm -f conf.glibtest - AC_TRY_RUN([ -#include -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.glibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_glib_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_glib_version"); - exit(1); - } - - if ((glib_major_version != $glib_config_major_version) || - (glib_minor_version != $glib_config_minor_version) || - (glib_micro_version != $glib_config_micro_version)) - { - printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, - glib_major_version, glib_minor_version, glib_micro_version); - printf ("*** was found! If glib-config was correct, then it is best\n"); - printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); - printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } - else if ((glib_major_version != GLIB_MAJOR_VERSION) || - (glib_minor_version != GLIB_MINOR_VERSION) || - (glib_micro_version != GLIB_MICRO_VERSION)) - { - printf("*** GLIB header files (version %d.%d.%d) do not match\n", - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - glib_major_version, glib_minor_version, glib_micro_version); - } - else - { - if ((glib_major_version > major) || - ((glib_major_version == major) && (glib_minor_version > minor)) || - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", - glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the glib-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); - printf("*** correct copy of glib-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} -],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_glib" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$GLIB_CONFIG" = "no" ; then - echo "*** The glib-config script installed by GLIB could not be found" - echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GLIB_CONFIG environment variable to the" - echo "*** full path to glib-config." - else - if test -f conf.glibtest ; then - : - else - echo "*** Could not run GLIB test program, checking why..." - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$LIBS $GLIB_LIBS" - AC_TRY_LINK([ -#include -#include -], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GLIB or finding the wrong" - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" ], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB was incorrectly installed" - echo "*** or that you have moved GLIB since it was installed. In the latter case, you" - echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GLIB_CFLAGS="" - GLIB_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(GLIB_CFLAGS) - AC_SUBST(GLIB_LIBS) - rm -f conf.glibtest -]) - diff --git a/plug-ins/perl/etc/config.h.in b/plug-ins/perl/etc/config.h.in deleted file mode 100644 index b1913b9e05..0000000000 --- a/plug-ins/perl/etc/config.h.in +++ /dev/null @@ -1,19 +0,0 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if we have DIVIDE_MODE. */ -#undef HAVE_DIVIDE_MODE - -/* Define if you have the _exit function. */ -#undef HAVE__EXIT - -/* Define if you have the vsnprintf function. */ -#undef HAVE_VSNPRINTF - -/* Define if you have the header file. */ -#undef HAVE_LIBGIMP_GIMPMODULE_H - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H diff --git a/plug-ins/perl/etc/config.pl.in b/plug-ins/perl/etc/config.pl.in deleted file mode 100644 index 71a773fa0b..0000000000 --- a/plug-ins/perl/etc/config.pl.in +++ /dev/null @@ -1,146 +0,0 @@ -# this is ugly, but it makes Gimp installable from within CPAN - -$topdir="."; - -$topdir.="/.." while ! -f "$topdir/MANIFEST"; - -$^W=0; - -%cfg = ( - _CPPFLAGS => q[@CPPFLAGS@], - _CFLAGS => q[@CFLAGS@], - _LDFLAGS => q[@LDFLAGS@], - - prefix => q[@prefix@], - exec_prefix => q[@exec_prefix@], - libdir => q[@libdir@], - bindir => q[@bindir@], - - _PERL => q[@PERL@], - GIMP => q[@GIMP@], - - GIMPTOOL => q[@GIMPTOOL@], - _GIMP_INC => q[@GIMP_CFLAGS@], - _GIMP_INC_NOUI => q[@GIMP_CFLAGS_NOUI@], - _GIMP_LIBS => q[@GIMP_LIBS@], - _GIMP_LIBS_NOUI => q[@GIMP_LIBS_NOUI@], - - GLIB_CFLAGS => q[@GLIB_CFLAGS@], - GLIB_LIBS => q[@GLIB_LIBS@], - - INSTALL => q[@INSTALL@], - INSTALL_PROGRAM => q[@INSTALL_PROGRAM@], - gimpplugindir => q[@gimpplugindir@], - - _EXTENSIVE_TESTS => q[@EXTENSIVE_TESTS@], - - IN_GIMP => q[@IN_GIMP@], - top_builddir => q[@top_builddir@], - - pdl_inc => '', - pdl_typemaps => '', - INC1 => '', - DEFINE1 => '', -); - -sub expand { - my $cfg = shift; - my $count = 5; - while($cfg=~/\$\{/ and $count--) { - while(($k,$v)=each %cfg) { - $cfg=~s/\$\{$k\}/$v/g; - } - } - $cfg; -} - -while (($k,$v)=each(%cfg)) { - $k=~s/^_//; - $$k=$v; -} - -$GIMPTOOL = expand($GIMPTOOL); - -if ($IN_GIMP) { - $GIMP = $bindir."/gimp" if $IN_GIMP; - $GIMP_PREFIX=expand($prefix); -} else { - chomp ($GIMP_PREFIX = `$GIMPTOOL --prefix`); - $gimpplugindir = `$GIMPTOOL -n --install-admin-bin /bin/sh`; - $gimpplugindir =~ s{^.*\s(.*?)(?:/+bin/sh)\r?\n?$}{$1} && - $gimpplugindir =~ s{/plug-ins$}{} or die "\nFATAL: unable to deduce plugindir from gimptool script\n\n"; - $GIMP = expand($GIMP); -} - -$cfg{GIMP_PREFIX} = $GIMP_PREFIX; - -$GIMP_INC =~ s%\$topdir%$topdir%g; -$GIMP_INC_NOUI =~ s%\$topdir%$topdir%g; -$GIMP_LIBS =~ s%\$topdir%$topdir%g; -$GIMP_LIBS_NOUI =~ s%\$topdir%$topdir%g; - -# $...1 variables should be put in front of the corresponding MakeMaker values. -$INC1 = "-I$topdir"; -$DEFINE1 = $IN_GIMP ? "-DIN_GIMP" : ""; - -eval "use PDL"; -if (!$@) { - require PDL::Version; - if ($PDL::Version::VERSION > 1.99) { - require PDL::Core::Dev; - if (!$@) { - $PDL=1; - } else { - $do_config_msg && print <SUPER::makefile(@_); - $t =~ s/^ false$/ true/m; - $t; -} - - diff --git a/plug-ins/perl/etc/configure b/plug-ins/perl/etc/configure deleted file mode 100755 index b05d3c871a..0000000000 --- a/plug-ins/perl/etc/configure +++ /dev/null @@ -1,1815 +0,0 @@ -#! /bin/sh - -# Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. - -# Defaults: -ac_help= -ac_default_prefix=/usr/local -# Any additions from configure.in: -ac_default_prefix=$prefix -ac_help="$ac_help - --with-cflags=FLAGS Set CFLAGS to FLAGS (optional)" -ac_help="$ac_help - --with-ldflags=FLAGS Set LDFLAGS to FLAGS (optional)" -ac_help="$ac_help - --with-includes=DIR Additionally search for includes in dir DIR (optional)" -ac_help="$ac_help - --with-libs=DIR Additionally search for libraries in dir in DIR (optional)" -ac_help="$ac_help - --with-gimp-prefix=PFX Prefix where GIMP is installed (optional)" -ac_help="$ac_help - --with-gimp-exec-prefix=PFX Exec prefix where GIMP is installed (optional)" -ac_help="$ac_help - --disable-gimptest Do not try to compile and run a test GIMP program" -ac_help="$ac_help - --with-glib-prefix=PFX Prefix where GLIB is installed (optional)" -ac_help="$ac_help - --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)" -ac_help="$ac_help - --disable-glibtest Do not try to compile and run a test GLIB program" - -# Initialize some variables set by options. -# The variables have the same names as the options, with -# dashes changed to underlines. -build=NONE -cache_file=./config.cache -exec_prefix=NONE -host=NONE -no_create= -nonopt=NONE -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -target=NONE -verbose= -x_includes=NONE -x_libraries=NONE -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -# Initialize some other variables. -subdirs= -MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -ac_max_here_lines=12 - -ac_prev= -for ac_option -do - - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - case "$ac_option" in - -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; - *) ac_optarg= ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case "$ac_option" in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir="$ac_optarg" ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build="$ac_optarg" ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir="$ac_optarg" ;; - - -disable-* | --disable-*) - ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - eval "enable_${ac_feature}=no" ;; - - -enable-* | --enable-*) - ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } - fi - ac_feature=`echo $ac_feature| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "enable_${ac_feature}='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix="$ac_optarg" ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he) - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat << EOF -Usage: configure [options] [host] -Options: [defaults in brackets after descriptions] -Configuration: - --cache-file=FILE cache test results in FILE - --help print this message - --no-create do not create output files - --quiet, --silent do not print \`checking...' messages - --version print the version of autoconf that created configure -Directory and file names: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [same as prefix] - --bindir=DIR user executables in DIR [EPREFIX/bin] - --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] - --libexecdir=DIR program executables in DIR [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data in DIR - [PREFIX/share] - --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data in DIR - [PREFIX/com] - --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] - --libdir=DIR object code libraries in DIR [EPREFIX/lib] - --includedir=DIR C header files in DIR [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] - --infodir=DIR info documentation in DIR [PREFIX/info] - --mandir=DIR man documentation in DIR [PREFIX/man] - --srcdir=DIR find the sources in DIR [configure dir or ..] - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM - run sed PROGRAM on installed program names -EOF - cat << EOF -Host type: - --build=BUILD configure for building on BUILD [BUILD=HOST] - --host=HOST configure for HOST [guessed] - --target=TARGET configure for TARGET [TARGET=HOST] -Features and packages: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -EOF - if test -n "$ac_help"; then - echo "--enable and --with options recognized:$ac_help" - fi - exit 0 ;; - - -host | --host | --hos | --ho) - ac_prev=host ;; - -host=* | --host=* | --hos=* | --ho=*) - host="$ac_optarg" ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir="$ac_optarg" ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir="$ac_optarg" ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir="$ac_optarg" ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir="$ac_optarg" ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir="$ac_optarg" ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir="$ac_optarg" ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir="$ac_optarg" ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix="$ac_optarg" ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix="$ac_optarg" ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix="$ac_optarg" ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name="$ac_optarg" ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir="$ac_optarg" ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir="$ac_optarg" ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site="$ac_optarg" ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir="$ac_optarg" ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir="$ac_optarg" ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target="$ac_optarg" ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.13" - exit 0 ;; - - -with-* | --with-*) - ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - case "$ac_option" in - *=*) ;; - *) ac_optarg=yes ;; - esac - eval "with_${ac_package}='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`echo $ac_option|sed -e 's/-*without-//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then - { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } - fi - ac_package=`echo $ac_package| sed 's/-/_/g'` - eval "with_${ac_package}=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes="$ac_optarg" ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries="$ac_optarg" ;; - - -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } - ;; - - *) - if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then - echo "configure: warning: $ac_option: invalid host type" 1>&2 - fi - if test "x$nonopt" != xNONE; then - { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } - fi - nonopt="$ac_option" - ;; - - esac -done - -if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } -fi - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -# File descriptor usage: -# 0 standard input -# 1 file creation -# 2 errors and warnings -# 3 some systems may open it to /dev/tty -# 4 used on the Kubota Titan -# 6 checking for... messages and results -# 5 compiler messages saved in config.log -if test "$silent" = yes; then - exec 6>/dev/null -else - exec 6>&1 -fi -exec 5>./config.log - -echo "\ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -" 1>&5 - -# Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell metacharacters. -ac_configure_args= -for ac_arg -do - case "$ac_arg" in - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c) ;; - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_configure_args="$ac_configure_args '$ac_arg'" ;; - *) ac_configure_args="$ac_configure_args $ac_arg" ;; - esac -done - -# NLS nuisances. -# Only set these to C if already set. These must not be set unconditionally -# because not all systems understand e.g. LANG=C (notably SCO). -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! -# Non-C LC_CTYPE values break the ctype check. -if test "${LANG+set}" = set; then LANG=C; export LANG; fi -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo > confdefs.h - -# A filename unique to this package, relative to the directory that -# configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=config.pl.in - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_prog=$0 - ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` - test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } - else - { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } - fi -fi -srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` - -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - echo "loading site script $ac_site_file" - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - echo "loading cache $cache_file" - . $cache_file -else - echo "creating cache $cache_file" - > $cache_file -fi - -ac_ext=c -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' -cross_compiling=$ac_cv_prog_cc_cross - -ac_exeext= -ac_objext=o -if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then - # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. - if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then - ac_n= ac_c=' -' ac_t=' ' - else - ac_n=-n ac_c= ac_t= - fi -else - ac_n= ac_c='\c' ac_t= -fi - - - - - - -# Check whether --with-cflags or --without-cflags was given. -if test "${with_cflags+set}" = set; then - withval="$with_cflags" - CFLAGS="$with_cflags" -fi - - -# Check whether --with-ldflags or --without-ldflags was given. -if test "${with_ldflags+set}" = set; then - withval="$with_ldflags" - LDFLAGS="$with_ldflags" -fi - - -# Check whether --with-includes or --without-includes was given. -if test "${with_includes+set}" = set; then - withval="$with_includes" - CPPFLAGS="$CPPFLAGS -I$with_includes" -fi - - -# Check whether --with-libs or --without-libs was given. -if test "${with_libs+set}" = set; then - withval="$with_libs" - LIBS="$LIBS -L$with_libs" -fi - - -for ac_prog in gimp -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:583: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GIMP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GIMP" in - /*) - ac_cv_path_GIMP="$GIMP" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GIMP="$GIMP" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GIMP="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -GIMP="$ac_cv_path_GIMP" -if test -n "$GIMP"; then - echo "$ac_t""$GIMP" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -test -n "$GIMP" && break -done - - -# Check whether --with-gimp-prefix or --without-gimp-prefix was given. -if test "${with_gimp_prefix+set}" = set; then - withval="$with_gimp_prefix" - gimptool_prefix="$withval" -else - gimptool_prefix="" -fi - -# Check whether --with-gimp-exec-prefix or --without-gimp-exec-prefix was given. -if test "${with_gimp_exec_prefix+set}" = set; then - withval="$with_gimp_exec_prefix" - gimptool_exec_prefix="$withval" -else - gimptool_exec_prefix="" -fi - -# Check whether --enable-gimptest or --disable-gimptest was given. -if test "${enable_gimptest+set}" = set; then - enableval="$enable_gimptest" - : -else - enable_gimptest=yes -fi - - - if test x$gimptool_exec_prefix != x ; then - gimptool_args="$gimptool_args --exec-prefix=$gimptool_exec_prefix" - if test x${GIMPTOOL+set} != xset ; then - GIMPTOOL=$gimptool_exec_prefix/bin/gimptool - fi - fi - if test x$gimptool_prefix != x ; then - gimptool_args="$gimptool_args --prefix=$gimptool_prefix" - if test x${GIMPTOOL+set} != xset ; then - GIMPTOOL=$gimptool_prefix/bin/gimptool - fi - fi - - # Extract the first word of "gimptool", so it can be a program name with args. -set dummy gimptool; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:660: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GIMPTOOL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GIMPTOOL" in - /*) - ac_cv_path_GIMPTOOL="$GIMPTOOL" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GIMPTOOL="$GIMPTOOL" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GIMPTOOL="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GIMPTOOL" && ac_cv_path_GIMPTOOL="no" - ;; -esac -fi -GIMPTOOL="$ac_cv_path_GIMPTOOL" -if test -n "$GIMPTOOL"; then - echo "$ac_t""$GIMPTOOL" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - min_gimp_version=1.0.4 - echo $ac_n "checking for GIMP - version >= $min_gimp_version""... $ac_c" 1>&6 -echo "configure:695: checking for GIMP - version >= $min_gimp_version" >&5 - no_gimp="" - if test "$GIMPTOOL" = "no" ; then - no_gimp=yes - else - GIMP_CFLAGS=`$GIMPTOOL $gimptool_args --cflags` - GIMP_LIBS=`$GIMPTOOL $gimptool_args --libs` - - GIMP_CFLAGS_NOUI=`$GIMPTOOL $gimptool_args --cflags-noui` - noui_test=`echo $GIMP_CFLAGS_NOUI | sed 's/^\(Usage\).*/\1/'` - if test "$noui_test" = "Usage" ; then - GIMP_CFLAGS_NOUI=$GIMP_CFLAGS - GIMP_LIBS_NOUI=$GIMP_LIBS - else - GIMP_LIBS_NOUI=`$GIMPTOOL $gimptool_args --libs-noui` - fi - - gimptool_major_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - gimptool_minor_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - gimptool_micro_version=`$GIMPTOOL $gimptool_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_gimptest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GIMP_CFLAGS" - LIBS="$LIBS $GIMP_LIBS" - rm -f conf.gimptest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat > conftest.$ac_ext < -#include -#include - -GPlugInInfo PLUG_IN_INFO = -{ - NULL, /* init_proc */ - NULL, /* quit_proc */ - NULL, /* query_proc */ - NULL /* run_proc */ -}; - -int main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.gimptest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_gimp_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_gimp_version"); - exit(1); - } - - if (($gimptool_major_version > major) || - (($gimptool_major_version == major) && ($gimptool_minor_version > minor)) || - (($gimptool_major_version == major) && ($gimptool_minor_version == minor) && ($gimptool_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** 'gimptool --version' returned %d.%d.%d, but the minimum version\n", $gimptool_major_version, $gimptool_minor_version, $gimptool_micro_version); - printf("*** of GIMP required is %d.%d.%d. If gimptool is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If gimptool was wrong, set the environment variable GIMPTOOL\n"); - printf("*** to point to the correct copy of gimptool, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; - } -} - - -EOF -if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - no_gimp=yes -fi -rm -fr conftest* -fi - - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_gimp" = x ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - if test "$GIMPTOOL" = "no" ; then - echo "*** The gimptool script installed by GIMP could not be found" - echo "*** If GIMP was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GIMPTOOL environment variable to the" - echo "*** full path to gimptool." - else - if test -f conf.gimptest ; then - : - else - echo "*** Could not run GIMP test program, checking why..." - CFLAGS="$CFLAGS $GIMP_CFLAGS" - LIBS="$LIBS $GIMP_LIBS" - cat > conftest.$ac_ext < -#include - -int main() { - return 0; -; return 0; } -EOF -if { (eval echo configure:821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GIMP or finding the wrong" - echo "*** version of GIMP. If it is not finding GIMP, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GIMP was incorrectly installed" - echo "*** or that you have moved GIMP since it was installed. In the latter case, you" - echo "*** may want to edit the gimptool script: $GIMPTOOL" -fi -rm -f conftest* - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GIMP_CFLAGS="" - GIMP_LIBS="" - GIMP_CFLAGS_NOUI="" - GIMP_LIBS_NOUI="" - { echo "configure: error: ** unable to find gimp" 1>&2; exit 1; } - fi - - - - - rm -f conf.gimptest - - -# Check whether --with-glib-prefix or --without-glib-prefix was given. -if test "${with_glib_prefix+set}" = set; then - withval="$with_glib_prefix" - glib_config_prefix="$withval" -else - glib_config_prefix="" -fi - -# Check whether --with-glib-exec-prefix or --without-glib-exec-prefix was given. -if test "${with_glib_exec_prefix+set}" = set; then - withval="$with_glib_exec_prefix" - glib_config_exec_prefix="$withval" -else - glib_config_exec_prefix="" -fi - -# Check whether --enable-glibtest or --disable-glibtest was given. -if test "${enable_glibtest+set}" = set; then - enableval="$enable_glibtest" - : -else - enable_glibtest=yes -fi - - - if test x$glib_config_exec_prefix != x ; then - glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config - fi - fi - if test x$glib_config_prefix != x ; then - glib_config_args="$glib_config_args --prefix=$glib_config_prefix" - if test x${GLIB_CONFIG+set} != xset ; then - GLIB_CONFIG=$glib_config_prefix/bin/glib-config - fi - fi - - for module in . - do - case "$module" in - gmodule) - glib_config_args="$glib_config_args gmodule" - ;; - gthread) - glib_config_args="$glib_config_args gthread" - ;; - esac - done - - # Extract the first word of "glib-config", so it can be a program name with args. -set dummy glib-config; ac_word=$2 -echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:912: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - case "$GLIB_CONFIG" in - /*) - ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GLIB_CONFIG="$GLIB_CONFIG" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GLIB_CONFIG="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GLIB_CONFIG" && ac_cv_path_GLIB_CONFIG="no" - ;; -esac -fi -GLIB_CONFIG="$ac_cv_path_GLIB_CONFIG" -if test -n "$GLIB_CONFIG"; then - echo "$ac_t""$GLIB_CONFIG" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - min_glib_version=1.2.0 - echo $ac_n "checking for GLIB - version >= $min_glib_version""... $ac_c" 1>&6 -echo "configure:947: checking for GLIB - version >= $min_glib_version" >&5 - no_glib="" - if test "$GLIB_CONFIG" = "no" ; then - no_glib=yes - else - GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` - GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` - glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` - glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` - glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ - sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` - if test "x$enable_glibtest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$GLIB_LIBS $LIBS" - rm -f conf.glibtest - if test "$cross_compiling" = yes; then - echo $ac_n "cross compiling; assumed OK... $ac_c" -else - cat > conftest.$ac_ext < -#include -#include - -int -main () -{ - int major, minor, micro; - char *tmp_version; - - system ("touch conf.glibtest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = g_strdup("$min_glib_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_glib_version"); - exit(1); - } - - if ((glib_major_version != $glib_config_major_version) || - (glib_minor_version != $glib_config_minor_version) || - (glib_micro_version != $glib_config_micro_version)) - { - printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", - $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, - glib_major_version, glib_minor_version, glib_micro_version); - printf ("*** was found! If glib-config was correct, then it is best\n"); - printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); - printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); - printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); - printf("*** required on your system.\n"); - printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); - printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); - printf("*** before re-running configure\n"); - } - else if ((glib_major_version != GLIB_MAJOR_VERSION) || - (glib_minor_version != GLIB_MINOR_VERSION) || - (glib_micro_version != GLIB_MICRO_VERSION)) - { - printf("*** GLIB header files (version %d.%d.%d) do not match\n", - GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); - printf("*** library (version %d.%d.%d)\n", - glib_major_version, glib_minor_version, glib_micro_version); - } - else - { - if ((glib_major_version > major) || - ((glib_major_version == major) && (glib_minor_version > minor)) || - ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) - { - return 0; - } - else - { - printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", - glib_major_version, glib_minor_version, glib_micro_version); - printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", - major, minor, micro); - printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); - printf("***\n"); - printf("*** If you have already installed a sufficiently new version, this error\n"); - printf("*** probably means that the wrong copy of the glib-config shell script is\n"); - printf("*** being found. The easiest way to fix this is to remove the old version\n"); - printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); - printf("*** correct copy of glib-config. (In this case, you will have to\n"); - printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); - printf("*** so that the correct libraries are found at run-time))\n"); - } - } - return 1; -} - -EOF -if { (eval echo configure:1046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null -then - : -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -fr conftest* - no_glib=yes -fi -rm -fr conftest* -fi - - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_glib" = x ; then - echo "$ac_t""yes" 1>&6 - : - else - echo "$ac_t""no" 1>&6 - if test "$GLIB_CONFIG" = "no" ; then - echo "*** The glib-config script installed by GLIB could not be found" - echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the GLIB_CONFIG environment variable to the" - echo "*** full path to glib-config." - else - if test -f conf.glibtest ; then - : - else - echo "*** Could not run GLIB test program, checking why..." - CFLAGS="$CFLAGS $GLIB_CFLAGS" - LIBS="$LIBS $GLIB_LIBS" - cat > conftest.$ac_ext < -#include - -int main() { - return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); -; return 0; } -EOF -if { (eval echo configure:1090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding GLIB or finding the wrong" - echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" - echo "***" - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" - echo "*** came with the system with the command" - echo "***" - echo "*** rpm --erase --nodeps gtk gtk-devel" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means GLIB was incorrectly installed" - echo "*** or that you have moved GLIB since it was installed. In the latter case, you" - echo "*** may want to edit the glib-config script: $GLIB_CONFIG" -fi -rm -f conftest* - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - GLIB_CFLAGS="" - GLIB_LIBS="" - { echo "configure: error: ** unable to find glib" 1>&2; exit 1; } - fi - - - rm -f conf.glibtest - - -ac_gimp_save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS" -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1132: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP="${CC-cc} -nologo -E" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - -cat > conftest.$ac_ext < -EOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "DIVIDE_MODE" >/dev/null 2>&1; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_DIVIDE_MODE 1 -EOF - -fi -rm -f conftest* - -for ac_hdr in libgimp/gimpmodule.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1230: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - -CPPFLAGS="$ac_gimp_save_CPPFLAGS" - -for ac_hdr in unistd.h -do -ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1272: checking for $ac_hdr" >&5 -if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` -if test -z "$ac_err"; then - rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_header_$ac_safe=no" -fi -rm -f conftest* -fi -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` - cat >> confdefs.h <&6 -fi -done - - -CONFIG_H="config.h" - -for ac_func in vsnprintf -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1314: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <> confdefs.h <<\EOF -#define HAVE_VSNPRINTF 1 -EOF - -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: vsnprintf not found.. I hope you are using gcc..." 1>&2 - -fi -done - - -if test "x$GCC" = xyes; then - nowarn="-Wno-parentheses -Wno-unused -Wno-uninitialized" - GIMP_CFLAGS="$GIMP_CFLAGS $nowarn" - GIMP_CFLAGS_NOUI="$GIMP_CFLAGS" -fi - - - - - - - - - - - - - - - - - - -for ac_func in _exit -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1398: checking for $ac_func" >&5 -if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:1426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -done - - - - - -trap '' 1 2 15 -cat > confcache <<\EOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs. It is not useful on other systems. -# If it contains results you don't want to keep, you may remove or edit it. -# -# By default, configure uses ./config.cache as the cache file, -# creating it if it does not exist already. You can give configure -# the --cache-file=FILE option to use a different cache file; that is -# what configure does when it calls configure scripts in -# subdirectories, so they share the cache. -# Giving --cache-file=/dev/null disables caching, for debugging configure. -# config.status only pays attention to the cache file if you give it the -# --recheck option to rerun configure. -# -EOF -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -(set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote substitution - # turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - -e "s/'/'\\\\''/g" \ - -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' - ;; - esac >> confcache -if cmp -s $cache_file confcache; then - : -else - if test -w $cache_file; then - echo "updating cache $cache_file" - cat confcache > $cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Any assignment to VPATH causes Sun make to only execute -# the first set of double-colon rules, so remove it if not needed. -# If there is a colon in the path, we need to keep it. -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' -fi - -trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - -DEFS=-DHAVE_CONFIG_H - -# Without the "./", some shells look in PATH for config.status. -: ${CONFIG_STATUS=./config.status} - -echo creating $CONFIG_STATUS -rm -f $CONFIG_STATUS -cat > $CONFIG_STATUS </dev/null | sed 1q`: -# -# $0 $ac_configure_args -# -# Compiler output produced by configure, useful for debugging -# configure, is in ./config.log if it exists. - -ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" -for ac_option -do - case "\$ac_option" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" - exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; - -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.13" - exit 0 ;; - -help | --help | --hel | --he | --h) - echo "\$ac_cs_usage"; exit 0 ;; - *) echo "\$ac_cs_usage"; exit 1 ;; - esac -done - -ac_given_srcdir=$srcdir - -trap 'rm -fr `echo "config.pl config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 -EOF -cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF -$ac_vpsub -$extrasub -s%@SHELL@%$SHELL%g -s%@CFLAGS@%$CFLAGS%g -s%@CPPFLAGS@%$CPPFLAGS%g -s%@CXXFLAGS@%$CXXFLAGS%g -s%@FFLAGS@%$FFLAGS%g -s%@DEFS@%$DEFS%g -s%@LDFLAGS@%$LDFLAGS%g -s%@LIBS@%$LIBS%g -s%@exec_prefix@%$exec_prefix%g -s%@prefix@%$prefix%g -s%@program_transform_name@%$program_transform_name%g -s%@bindir@%$bindir%g -s%@sbindir@%$sbindir%g -s%@libexecdir@%$libexecdir%g -s%@datadir@%$datadir%g -s%@sysconfdir@%$sysconfdir%g -s%@sharedstatedir@%$sharedstatedir%g -s%@localstatedir@%$localstatedir%g -s%@libdir@%$libdir%g -s%@includedir@%$includedir%g -s%@oldincludedir@%$oldincludedir%g -s%@infodir@%$infodir%g -s%@mandir@%$mandir%g -s%@GIMP@%$GIMP%g -s%@GIMPTOOL@%$GIMPTOOL%g -s%@GIMP_CFLAGS@%$GIMP_CFLAGS%g -s%@GIMP_LIBS@%$GIMP_LIBS%g -s%@GIMP_CFLAGS_NOUI@%$GIMP_CFLAGS_NOUI%g -s%@GIMP_LIBS_NOUI@%$GIMP_LIBS_NOUI%g -s%@GLIB_CONFIG@%$GLIB_CONFIG%g -s%@GLIB_CFLAGS@%$GLIB_CFLAGS%g -s%@GLIB_LIBS@%$GLIB_LIBS%g -s%@CPP@%$CPP%g -s%@EXTENSIVE_TESTS@%$EXTENSIVE_TESTS%g -s%@IN_GIMP@%$IN_GIMP%g -s%@PERL@%$PERL%g - -CEOF -EOF - -cat >> $CONFIG_STATUS <<\EOF - -# Split the substitutions into bite-sized pieces for seds with -# small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. -ac_file=1 # Number of current file. -ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_cmds # Line after last line for current file. -ac_more_lines=: -ac_sed_cmds="" -while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file - else - sed "${ac_end}q" conftest.subs > conftest.s$ac_file - fi - if test ! -s conftest.s$ac_file; then - ac_more_lines=false - rm -f conftest.s$ac_file - else - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f conftest.s$ac_file" - else - ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" - fi - ac_file=`expr $ac_file + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_cmds` - fi -done -if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat -fi -EOF - -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. - - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dir_suffix. - ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dir_suffix= ac_dots= - fi - - case "$ac_given_srcdir" in - .) srcdir=. - if test -z "$ac_dots"; then top_srcdir=. - else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; - *) # Relative path. - srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" - top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - - echo creating "$ac_file" - rm -f "$ac_file" - configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." - case "$ac_file" in - *Makefile*) ac_comsub="1i\\ -# $configure_input" ;; - *) ac_comsub= ;; - esac - - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - sed -e "$ac_comsub -s%@configure_input@%$configure_input%g -s%@srcdir@%$srcdir%g -s%@top_srcdir@%$top_srcdir%g -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file -fi; done -rm -f conftest.s* - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' -ac_dC='\3' -ac_dD='%g' -# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". -ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='\([ ]\)%\1#\2define\3' -ac_uC=' ' -ac_uD='\4%g' -# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_eB='$%\1#\2define\3' -ac_eC=' ' -ac_eD='%g' - -if test "${CONFIG_HEADERS+set}" != set; then -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -fi -for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` - ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - *) ac_file_in="${ac_file}.in" ;; - esac - - echo creating $ac_file - - rm -f conftest.frag conftest.in conftest.out - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > conftest.in - -EOF - -# Transform confdefs.h into a sed script conftest.vals that substitutes -# the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. -# Protect against being in an unquoted here document in config.status. -rm -f conftest.vals -cat > conftest.hdr <<\EOF -s/[\\&%]/\\&/g -s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -s%ac_d%ac_u%gp -s%ac_u%ac_e%gp -EOF -sed -n -f conftest.hdr confdefs.h > conftest.vals -rm -f conftest.hdr - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >> conftest.vals <<\EOF -s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% -EOF - -# Break up conftest.vals because some shells have a limit on -# the size of here documents, and old seds have small limits too. - -rm -f conftest.tail -while : -do - ac_lines=`grep -c . conftest.vals` - # grep -c gives empty output for an empty file on some AIX systems. - if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to conftest.frag. - echo ' cat > conftest.frag <> $CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS - echo 'CEOF - sed -f conftest.frag conftest.in > conftest.out - rm -f conftest.in - mv conftest.out conftest.in -' >> $CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail - rm -f conftest.vals - mv conftest.tail conftest.vals -done -rm -f conftest.vals - -cat >> $CONFIG_STATUS <<\EOF - rm -f conftest.frag conftest.h - echo "/* $ac_file. Generated automatically by configure. */" > conftest.h - cat conftest.in >> conftest.h - rm -f conftest.in - if cmp -s $ac_file conftest.h 2>/dev/null; then - echo "$ac_file is unchanged" - rm -f conftest.h - else - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" - fi - rm -f $ac_file - mv conftest.h $ac_file - fi -fi; done - -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF - -exit 0 -EOF -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 - - -echo "now invoking perl to complete the configuration..." -exec $PERL $MAKEFILE_PL --writemakefile PREFIX="$prefix" - diff --git a/plug-ins/perl/etc/configure.frag b/plug-ins/perl/etc/configure.frag deleted file mode 100644 index 29f26f3ef2..0000000000 --- a/plug-ins/perl/etc/configure.frag +++ /dev/null @@ -1,32 +0,0 @@ -AC_CHECK_FUNCS(vsnprintf,AC_DEFINE(HAVE_VSNPRINTF),[ - AC_MSG_WARN(vsnprintf not found.. I hope you are using gcc...) -]) - -dnl disable some warnings I don't want to see -if test "x$GCC" = xyes; then - nowarn="-Wno-parentheses -Wno-unused -Wno-uninitialized" - GIMP_CFLAGS="$GIMP_CFLAGS $nowarn" - GIMP_CFLAGS_NOUI="$GIMP_CFLAGS" -fi - -AC_SUBST(EXTENSIVE_TESTS)dnl from Makefile.PL - -AC_SUBST(CPPFLAGS) -AC_SUBST(CFLAGS) -AC_SUBST(LDFLAGS) -AC_SUBST(prefix) - -AC_SUBST(IN_GIMP) - -AC_SUBST(GIMP_CFLAGS) -AC_SUBST(GIMP_CFLAGS_NOUI) -AC_SUBST(GIMP_LIBS) -AC_SUBST(GIMP_LIBS_NOUI) -AC_SUBST(PERL) -AC_SUBST(GIMP) -AC_SUBST(GIMPTOOL) -AC_SUBST(GIMP_CFLAGS) -AC_SUBST(GIMP_LIBS) -AC_CHECK_FUNCS(_exit) - - diff --git a/plug-ins/perl/etc/configure.in b/plug-ins/perl/etc/configure.in deleted file mode 100644 index 623dd43610..0000000000 --- a/plug-ins/perl/etc/configure.in +++ /dev/null @@ -1,47 +0,0 @@ -AC_INIT(config.pl.in) - -AC_PREFIX_DEFAULT($prefix)dnl from Makefile.PL - -AC_CONFIG_HEADER(config.h) - -AC_ARG_WITH(cflags, [ --with-cflags=FLAGS Set CFLAGS to FLAGS (optional)], - CFLAGS="$with_cflags") - -AC_ARG_WITH(ldflags, [ --with-ldflags=FLAGS Set LDFLAGS to FLAGS (optional)], - LDFLAGS="$with_ldflags") - -AC_ARG_WITH(includes,[ --with-includes=DIR Additionally search for includes in dir DIR (optional)], - CPPFLAGS="$CPPFLAGS -I$with_includes") - -AC_ARG_WITH(libs, [ --with-libs=DIR Additionally search for libraries in dir in DIR (optional)], - LIBS="$LIBS -L$with_libs") - -AC_PATH_PROGS(GIMP,gimp) - -AM_PATH_GIMP(1.0.4,, AC_MSG_ERROR( -** unable to find gimp, make sure it's in your path (version 1.0.4+ required!) -** You can get the gimp from ftp://ftp.gimp.org/pub/gimp. -)) - -AM_PATH_GLIB(1.2.0,, AC_MSG_ERROR( -** unable to find glib, make sure it's in your path (version 1.2.0+ required!) -** You can get glib from ftp://ftp.gtk.org/pub/glib. -)) - -ac_gimp_save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $GIMP_CFLAGS" -AC_EGREP_CPP(DIVIDE_MODE,[#include ],AC_DEFINE(HAVE_DIVIDE_MODE)) -AC_CHECK_HEADERS(libgimp/gimpmodule.h) -CPPFLAGS="$ac_gimp_save_CPPFLAGS" - -AC_CHECK_HEADERS(unistd.h) - -CONFIG_H="config.h" - -sinclude(configure.frag) - -AC_OUTPUT(config.pl) - -echo "now invoking perl to complete the configuration..." -exec $PERL $MAKEFILE_PL --writemakefile PREFIX="$prefix" - diff --git a/plug-ins/perl/examples/PDB b/plug-ins/perl/examples/PDB index 3f8b46c38b..e646db41af 100755 --- a/plug-ins/perl/examples/PDB +++ b/plug-ins/perl/examples/PDB @@ -3,7 +3,7 @@ #BEGIN {$^W=1}; use Gimp::Feature qw(perl-5.005 gtk-1.2); -use Gimp (':consts'); +use Gimp (':consts','__'); use Gimp::Fu; use Gtk; use Gtk::Gdk; @@ -187,13 +187,13 @@ sub complete_function { my @matches = eval { sort grep /$name/i,@function }; if(@matches>1e6) {#d# set_clist map(($_,$_),@matches[0..149]); - $synopsis->set("showing only the first 150 matches (of ".(scalar@matches).")"); + $synopsis->set(sprintf __"showing only the first 150 matches (of %d)", (scalar@matches)); } elsif(@matches>1) { set_clist map(($_,$_),@matches); - $synopsis->set(scalar@matches." matching functions"); + $synopsis->set(scalar@matches.__" matching functions"); } else { set_clist @matches,@matches; - $synopsis->set($matches[0]." (press Tab to complete)"); + $synopsis->set($matches[0].__" (press Tab to complete)"); } } @@ -240,7 +240,7 @@ sub update_completion { if ($idx == 0) { complete_function($words[0]); } elsif ($idx>@args) { - $synopsis->set('too many arguments'); + $synopsis->set(__"too many arguments"); set_clist; } else { complete_type(@{$args[$idx-1]}); @@ -348,10 +348,10 @@ sub inputline { sub info { my $info = new Gtk::Dialog; - $info->set_title("Function Info"); + $info->set_title(__"Function Info"); $info->signal_connect(delete_event => sub { $info->hide }); - my $close = new Gtk::Button "Close"; + my $close = new Gtk::Button __"Close"; $close->signal_connect(clicked => sub { $info->hide }); $info->action_area->add($close); @@ -364,9 +364,9 @@ sub info { }; $blurb_label = new Gtk::Label; - add_info("Menu Path", $menupath_label = new Gtk::Label); - add_info("Accelerator", $accelerator_label = new Gtk::Label); - add_info("Image Types", $imagetypes_label = new Gtk::Label); + add_info(__"Menu Path", $menupath_label = new Gtk::Label); + add_info(__"Accelerator", $accelerator_label = new Gtk::Label); + add_info(__"Image Types", $imagetypes_label = new Gtk::Label); $help_text = new Gtk::Text; $help_text->set_editable(0); @@ -374,14 +374,14 @@ sub info { my $cs = new Gtk::ScrolledWindow undef,undef; $cs->set_policy(-automatic,-automatic); $cs->add ($help_text); - add_info ("Description", $cs, 1); + add_info (__"Description", $cs, 1); - add_info("Author", $author_label = new Gtk::Label); - add_info("Last Modified", $last_modified_label = new Gtk::Label); - add_info("Plug-In Path", $plugin_path_label = new Gtk::Label); + add_info(__"Author", $author_label = new Gtk::Label); + add_info(__"Last Modified", $last_modified_label = new Gtk::Label); + add_info(__"Plug-In Path", $plugin_path_label = new Gtk::Label); my $h = new Gtk::HBox(0,5); - my $more = new Gtk::Button "More..."; + my $more = new Gtk::Button __"More..."; $more->signal_connect(clicked => sub { $info->visible ? $info->hide : $info->show_all }); $h->add($blurb_label); $h->add($more); @@ -401,10 +401,10 @@ sub create_main { $ex = $w->style->font->string_width ('Mn')*0.5; $ey = $w->style->font->string_width ('My'); - $w->set_title('PDB Explorer - the olof edition (yet still an alpha version)'); + $w->set_title(__"PDB Explorer - the olof edition (yet still an alpha version)"); $w->signal_connect("destroy",sub {main_quit Gtk}); - $b = new Gtk::Button "Close"; + $b = new Gtk::Button __"Close"; $w->action_area->add($b); $b->signal_connect("clicked",sub {main_quit Gtk}); @@ -436,20 +436,20 @@ sub create_main { $table->border_width(10); - $table->attach(new Gtk::Label("Synopsis") ,0,1,0,1,{},{},0,0); + $table->attach(new Gtk::Label(__"Synopsis") ,0,1,0,1,{},{},0,0); $table->attach($synopsis ,1,2,0,1,{},{},0,0); $table->attach(Gimp::UI::logo($w),2,3,0,1,{},{},0,0); - $table->attach(new Gtk::Label("Command") ,0,1,1,2,{},{},0,0); + $table->attach(new Gtk::Label(__"Command") ,0,1,1,2,{},{},0,0); $table->attach($inputline,1,2,1,2,['expand','fill'],{},0,0); $table->attach($result,2,3,1,2,['expand','fill'],{},0,0); - $table->attach(new Gtk::Label("Shortcuts"),0,1,2,3,{},{},0,0); + $table->attach(new Gtk::Label(__"Shortcuts"),0,1,2,3,{},{},0,0); $table->attach($cs ,1,2,2,3,['expand','fill'],['expand','fill'],0,0); $table->attach($rs,2,3,2,3,['expand','fill'],['expand','fill'],0,0); - $table->attach(new Gtk::Label("Status"),0,1,3,4,{},{},0,0); + $table->attach(new Gtk::Label(__"Status"),0,1,3,4,{},{},0,0); $table->attach($statusbar,1,3,3,4,['expand','fill'],['expand','fill'],0,0); # the Info frame - my $ci = new Gtk::Frame "Info"; + my $ci = new Gtk::Frame __"Info"; $ci->border_width(10); my $v = new Gtk::VBox(0,5); $ci->add($v); @@ -478,7 +478,7 @@ register "extension_pdb_explorer", "Marc Lehmann", "Marc Lehmann", "0.4alpha", - "/Xtns/PDB Explorer", + __"/Xtns/PDB Explorer", "", [], sub { diff --git a/plug-ins/perl/examples/parasite-editor b/plug-ins/perl/examples/parasite-editor index 5f61c3b326..bdccd7de75 100755 --- a/plug-ins/perl/examples/parasite-editor +++ b/plug-ins/perl/examples/parasite-editor @@ -3,7 +3,7 @@ #BEGIN {$^W=1}; use Gimp::Feature qw(perl-5.005 gtk-1.2); -use Gimp (); +use Gimp ('__'); use Gimp::Fu; use Gtk; @@ -279,7 +279,7 @@ register "extension_parasite_editor", "Marc Lehmann", "Marc Lehmann", $VERSION, - "/Xtns/Parasite Editor", + __"/Xtns/Parasite Editor", "", [], [], diff --git a/plug-ins/perl/examples/perlcc b/plug-ins/perl/examples/perlcc index ab0188c899..53a84fa517 100755 --- a/plug-ins/perl/examples/perlcc +++ b/plug-ins/perl/examples/perlcc @@ -1,6 +1,6 @@ #!/usr/bin/perl -use Gimp (); +use Gimp ('__'); use Gimp::Feature; $VERSION='0.0'; @@ -152,7 +152,7 @@ sub query { Gimp->install_procedure("extension_perl_control_center", "the perl control center gives information about gimp-perl", "The perl control center gives information about the status of gimp-perl and allows configuration of important system parameters", "Marc Lehmann", "Marc Lehmann", $VERSION, - "/Xtns/Perl/Control Center", "*", &Gimp::PROC_EXTENSION, + __"/Xtns/Perl/Control Center", "*", &Gimp::PROC_EXTENSION, [[&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []); }