PKG_CHECK_MODULES(HILDON, hildon-libs >= 0.9.50 hildon-fm)
AC_SUBST(HILDON_LIBS)
AC_SUBST(HILDON_CFLAGS)
-else
- PKG_CHECK_MODULES(BLUEZ, bluez)
- AC_SUBST(BLUEZ_LIBS)
- AC_SUBST(BLUEZ_CFLAGS)
fi
+PKG_CHECK_MODULES(BLUEZ, bluez)
+AC_SUBST(BLUEZ_LIBS)
+AC_SUBST(BLUEZ_CFLAGS)
+
PKG_CHECK_MODULES(GEOCLUE, geoclue, HAVE_GEOCLUE=yes, HAVE_GEOCLUE=no)
AM_CONDITIONAL(WITH_HILDON, test "x$HAVE_HILDON" = "xyes")
-#!/usr/bin/perl -w
+#!/scratchbox/tools/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
#
## Release information
my $PROGRAM = "intltool-update";
-my $VERSION = "0.35.4";
+my $VERSION = "0.33";
my $PACKAGE = "intltool";
## Loaded modules
"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
"soundlist(?:\\.in)+|". # GNOME specific
"keys(?:\\.in)+|". # GNOME Mime database specific
-"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
-"service(?:\\.in)+"; # DBus specific
+"theme(?:\\.in)+"; # http://www.freedesktop.org/Standards/icon-theme-spec
my $buildin_gettext_support =
"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
$| = 1;
## Sometimes the source tree will be rooted somewhere else.
-my $SRCDIR = $ENV{"srcdir"} || ".";
+my $SRCDIR = ".";
my $POTFILES_in;
+$SRCDIR = $ENV{"srcdir"} if $ENV{"srcdir"};
$POTFILES_in = "<$SRCDIR/POTFILES.in";
-my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
-
## Handle options
GetOptions
(
&Console_Write_IntltoolHelp if $arg_count > 1;
-my $PKGNAME = FindPackageName ();
-
# --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
+my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
if ($POT_ARG)
{
@buf_potfiles_ignore,
@buf_allfiles,
@buf_allfiles_sorted,
- @buf_potfiles_sorted,
- @buf_potfiles_ignore_sorted
+ @buf_potfiles_sorted
);
## Search and find all translatable files
}
print "Found $ignore: Ignoring files...\n" if $VERBOSE;
- open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
+ open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n";
while (<FILE>)
{
}
close FILE;
- @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
+ @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
}
foreach my $file (@buf_i18n_plain)
}
}
- if (/\w\.GetString *\(QUOTEDTEXT/)
+ if (/\.GetString ?\(QUOTEDTEXT/)
{
if (defined isNotValidMissing (unpack("x3 A*", $file))) {
## Remove the first 3 chars and add newline
last;
}
- ## N_ Q_ and _ are the three macros defined in gi8n.h
- if (/[NQ]?_ *\(QUOTEDTEXT/)
+ if (/_\(QUOTEDTEXT/)
{
if (defined isNotValidMissing (unpack("x3 A*", $file))) {
## Remove the first 3 chars and add newline
while (<FILE>)
{
# FIXME: share the pattern matching code with intltool-extract
- if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
+ if (/\s_(.*)=\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
{
if (defined isNotValidMissing (unpack("x3 A*", $file))) {
push @buf_allfiles, unpack("x3 A*", $file) . "\n";
$in2{$_} = 1;
}
- foreach (@buf_potfiles_ignore_sorted)
- {
- $in2{$_} = 1;
- }
-
my @result;
foreach (@buf_allfiles_sorted)
foreach (@buf_potfiles_sorted)
{
chomp (my $dummy = $_);
- if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
+ if ("$dummy" ne "" and ! -f "../$dummy")
{
push @buf_potfiles_notexist, $_;
}
warn "\n" if ($VERBOSE or @result);
warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
warn @buf_potfiles_notexist, "\n";
- warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
+ warn "Please remove them from POTFILES.in or POTFILES.skip. A file \e[1m'notexist'\e[0m\n".
"containing this list of absent files has been written in the current directory.\n";
}
}
sub GenerateHeaders
{
- my $EXTRACT = "/data/repos/mapper/intltool-extract";
+ my $EXTRACT = "/home/milang/src/mapper/intltool-extract";
chomp $EXTRACT;
$EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
#
sub GeneratePOTemplate
{
- my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext";
+ my $XGETTEXT = $ENV{"XGETTEXT"} || "/scratchbox/tools/bin/xgettext";
my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
chomp $XGETTEXT;
my $gettext_support_nonascii = 0;
# checks for GNU gettext >= 0.12
- my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
+ my $dummy = `$XGETTEXT --version --from-code=UTF-8 >/dev/null 2>/dev/null`;
if ($? == 0)
{
$gettext_support_nonascii = 1;
}
else
{
- print OUTFILE "$SRCDIR/../$_\n";
- $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
+ if ($SRCDIR eq ".") {
+ print OUTFILE "../$_\n";
+ } else {
+ print OUTFILE "$SRCDIR/../$_\n";
+ }
+ $gettext_code = &TextFile_DetermineEncoding ("../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
}
next if (! $gettext_support_nonascii);
"--files-from\=\.\/POTFILES\.in\.temp");
my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
push @xgettext_argument, $XGETTEXT_KEYWORDS;
- my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
- push @xgettext_argument, "--msgid-bugs-address\=$MSGID_BUGS_ADDRESS" if $MSGID_BUGS_ADDRESS;
push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
my $xgettext_command = join ' ', @xgettext_argument;
{
-f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
- my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge";
+ my $MSGMERGE = $ENV{"MSGMERGE"} || "/scratchbox/tools/bin/msgmerge";
my ($lang, $outfile) = @_;
print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
sub Console_Write_TranslationStatus
{
my ($lang, $output_file) = @_;
- my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+ my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
$output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
- system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
+ system ("$MSGFMT", "-o", "/dev/null", "--statistics", $output_file);
}
sub Console_Write_CoverageReport
{
- my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+ my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
&GatherPOFiles;
foreach my $lang (@languages)
{
print "$lang: ";
- system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
+ system ("$MSGFMT", "-o", "/dev/null", "--statistics", "$SRCDIR/$lang.po");
}
}
{
my $rest = $3;
my $untouched = $1;
- my $sub = "";
- # Ignore recursive definitions of variables
- $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
-
+ my $sub = $varhash{$2};
+
return SubstituteVariable ("$untouched$sub$rest");
}
($name, $version) = ($1, $2);
$name =~ s/[\[\]\s]//g;
$version =~ s/[\[\]\s]//g;
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ $varhash{"AC_PACKAGE_NAME"} = $name;
+ $varhash{"PACKAGE"} = $name;
+ $varhash{"AC_PACKAGE_VERSION"} = $version;
+ $varhash{"VERSION"} = $version;
}
if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
($name, $version) = ($1, $2);
$name =~ s/[\[\]\s]//g;
$version =~ s/[\[\]\s]//g;
- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ $varhash{"AC_PACKAGE_NAME"} = $name;
+ $varhash{"PACKAGE"} = $name;
+ $varhash{"AC_PACKAGE_VERSION"} = $version;
+ $varhash{"VERSION"} = $version;
}
# \s makes this not work, why?
$name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
- # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
- # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
- $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
+ # prepend '$' to auto* internal variables, usually they are
+ # used in configure.in/ac without the '$'
+ $name =~ s/AC_/\$AC_/g;
+ $name =~ s/\$\$/\$/g;
$name = $domain if $domain;
return $domain;
}
-
-sub FindMakevarsBugAddress
-{
-
- my $address = "";
- my $makevars_source; {
- local (*IN);
- open (IN, "<Makevars") || return undef;
- seek (IN, 0, 0);
- local $/; # slurp mode
- $makevars_source = <IN>;
- close IN;
- }
-
- $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m;
- $address =~ s/^\s+//;
- $address =~ s/\s+$//;
-
- return $address;
-}
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+VERSION=1.5.20
+TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
# See if we are running on zsh, and set the options which allow our
# commands through without removal of \ escapes.
show="$echo"
show_help=
execute_dlfiles=
-duplicate_deps=no
-preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
# Shell function definitions:
# This seems to be the best place for them
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $mkdir "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || {
- $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
- exit $EXIT_FAILURE
- }
- fi
-
- $echo "X$my_tmpdir" | $Xsed
-}
-
-
# func_win32_libid arg
# return the library type of file 'arg'
#
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
win32_nmres=`eval $NM -f posix -A $1 | \
- $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
+ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+ if test "X$win32_nmres" = "Ximport" ; then
+ win32_libid_type="x86 archive import"
+ else
+ win32_libid_type="x86 archive static"
+ fi
fi
;;
*DLL*)
$run ${rm}r "$my_xdir"
$show "$mkdir $my_xdir"
$run $mkdir "$my_xdir"
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
- exit $exit_status
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+ exit $status
fi
case $host in
*-darwin*)
# Darwin sucks
eval std_shrext=\"$shrext_cmds\"
-disable_libs=no
-
# Parse our command line options once, thoroughly.
while test "$#" -gt 0
do
preserve_args="$preserve_args $arg"
;;
- --tag)
- prevopt="--tag"
- prev=tag
- preserve_args="$preserve_args --tag"
- ;;
+ --tag) prevopt="--tag" prev=tag ;;
--tag=*)
set tag "$optarg" ${1+"$@"}
shift
exit $EXIT_FAILURE
fi
-case $disable_libs in
-no)
- ;;
-shared)
- build_libtool_libs=no
- build_old_libs=yes
- ;;
-static)
- build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
- ;;
-esac
-
# If this variable is set in any of the actions, the command in it
# will be execed at the end. This prevents here-documents from being
# left over by shells.
if test ! -d "${xdir}$objdir"; then
$show "$mkdir ${xdir}$objdir"
$run $mkdir ${xdir}$objdir
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
- exit $exit_status
+ status=$?
+ if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $status
fi
fi
no_install=no
objs=
non_pic_objects=
- notinst_path= # paths that contain not-installed libtool libraries
precious_files_regex=
prefer_static_libs=no
preload=no
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- prefer_static_libs=yes
else
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- prefer_static_libs=built
fi
build_libtool_libs=no
build_old_libs=yes
+ prefer_static_libs=yes
break
;;
esac
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
prev=
continue
;;
- darwin_framework|darwin_framework_skip)
- test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
+ darwin_framework)
+ compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
prev=
continue
;;
- -framework|-arch|-isysroot)
- case " $CC " in
- *" ${arg} ${1} "* | *" ${arg} ${1} "*)
- prev=darwin_framework_skip ;;
- *) compiler_flags="$compiler_flags $arg"
- prev=darwin_framework ;;
- esac
+ -framework|-arch)
+ prev=darwin_framework
+ compiler_flags="$compiler_flags $arg"
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- continue
- ;;
+ continue
+ ;;
-inst-prefix-dir)
prev=inst_prefix
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- absdir="$dir"
- notinst_path="$notinst_path $dir"
+ exit $EXIT_FAILURE
fi
dir="$absdir"
;;
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
;;
esac
continue
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-os2*)
+ *-*-mingw* | *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
# Rhapsody C and math libraries are in the System framework
deplibs="$deplibs -framework System"
continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
esac
elif test "X$arg" = "X-lc_r"; then
case $host in
# +DA*, +DD* enable 64-bit mode on the HP compiler
# -q* pass through compiler args for the IBM compiler
# -m* pass through architecture-specific compiler args for GCC
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -pg pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
- -t[45]*|-txscale*|@*)
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
esac
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
- compiler_flags="$compiler_flags $arg"
+ if test "$with_gcc" = "yes" ; then
+ compiler_flags="$compiler_flags $arg"
+ fi
continue
;;
if test -z "$pic_object" || test "$pic_object" = none ; then
arg="$non_pic_object"
fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- non_pic_objects="$non_pic_objects $non_pic_object"
fi
else
# Only an error if not doing a dry-run.
if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
- exit $exit_status
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$output_objdir"; then
+ exit $status
fi
fi
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
esac # case $deplib
if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
exit $EXIT_FAILURE
fi
fi
link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes ; then
- use_static_libs=no
- fi
if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-sco3.2v5* ) add_dir="-L$dir" ;;
*-*-darwin* )
# if the lib is a module then we can not link against
# it, someone is ignoring the new warnings I added
- if /usr/bin/file -L $add 2> /dev/null |
- $EGREP ": [^:]* bundle" >/dev/null ; then
+ if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
$echo "** Warning, lib $linklib is a module, not a shared library"
if test -z "$old_library" ; then
$echo
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
- deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
- dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+ deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
done
if test -n "$xrpath"; then
;;
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
# Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
;;
*)
# Add libc to deplibs on all other systems if necessary.
int main() { return 0; }
EOF
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
+ $LTCC -o conftest conftest.c $deplibs
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
# If $name is empty we are operating on a -L argument.
if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $LTCC $LTCFLAGS -o conftest conftest.c $i
+ $LTCC -o conftest conftest.c $i
# Did it work?
if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
deplibs=$newdeplibs
fi
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
-
# All the library-specific variables (install_libdir is set above).
library_names=
old_library=
fi
lib="$output_objdir/$realname"
- linknames=
for link
do
linknames="$linknames $link"
;;
esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
;;
esac
done
export_symbols="$output_objdir/$outputname.exp"
$run $rm $export_symbols
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* )
- $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
else
- $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
$run eval 'mv "$nlist"T "$nlist"'
- case $host in
- *cygwin* | *mingw* )
- $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
fi
fi
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
# Transform the symbol file into the correct name.
- case $host in
- *cygwin* | *mingw* )
- if test -f "$output_objdir/${outputname}.def" ; then
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
- else
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- fi
- ;;
- * )
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- ;;
- esac
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
# We have no uninstalled library dependencies, so finalize right now.
$show "$link_command"
$run eval "$link_command"
- exit_status=$?
+ status=$?
# Delete the generated files.
if test -n "$dlsyms"; then
$run $rm "$output_objdir/${outputname}S.${objext}"
fi
- exit $exit_status
+ exit $status
fi
if test -n "$shlibpath_var"; then
esac
case $host in
*cygwin* | *mingw* )
- output_name=`basename $output`
- output_path=`dirname $output`
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $rm $cwrappersource $cwrapper
- trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+ cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
+ cwrapper=`$echo ${output}.exe`
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
cat > $cwrappersource <<EOF
#include <malloc.h>
#include <stdarg.h>
#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
#if defined(PATH_MAX)
# define LT_PATHMAX PATH_MAX
#endif
#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
+#define DIR_SEPARATOR '/'
#endif
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
#endif
#ifndef DIR_SEPARATOR_2
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
#endif /* DIR_SEPARATOR_2 */
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
#define XFREE(stale) do { \
if (stale) { free ((void *) stale); stale = 0; } \
} while (0)
-/* -DDEBUG is fairly common in CFLAGS. */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
-
const char *program_name = NULL;
void * xmalloc (size_t num);
char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int check_executable(const char *path);
+char * basename (const char *name);
+char * fnqualify(const char *path);
char * strendzap(char *str, const char *pat);
void lt_fatal (const char *message, ...);
char **newargz;
int i;
- program_name = (char *) xstrdup (base_name (argv[0]));
- DEBUG("(main) argv[0] : %s\n",argv[0]);
- DEBUG("(main) program_name : %s\n",program_name);
+ program_name = (char *) xstrdup ((char *) basename (argv[0]));
newargz = XMALLOC(char *, argc+2);
EOF
- cat >> $cwrappersource <<EOF
- newargz[0] = (char *) xstrdup("$SHELL");
+ cat >> $cwrappersource <<EOF
+ newargz[0] = "$SHELL";
EOF
- cat >> $cwrappersource <<"EOF"
- newargz[1] = find_executable(argv[0]);
- if (newargz[1] == NULL)
- lt_fatal("Couldn't find %s", argv[0]);
- DEBUG("(main) found exe at : %s\n",newargz[1]);
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = fnqualify(argv[0]);
/* we know the script has the same name, without the .exe */
/* so make sure newargz[1] doesn't end in .exe */
strendzap(newargz[1],".exe");
for (i = 1; i < argc; i++)
newargz[i+1] = xstrdup(argv[i]);
newargz[argc+1] = NULL;
-
- for (i=0; i<argc+1; i++)
- {
- DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
- ;
- }
-
EOF
- case $host_os in
- mingw*)
- cat >> $cwrappersource <<EOF
- execv("$SHELL",(char const **)newargz);
-EOF
- ;;
- *)
- cat >> $cwrappersource <<EOF
+ cat >> $cwrappersource <<EOF
execv("$SHELL",newargz);
EOF
- ;;
- esac
- cat >> $cwrappersource <<"EOF"
+ cat >> $cwrappersource <<"EOF"
return 127;
}
;
}
-const char *
-base_name (const char *name)
+char *
+basename (const char *name)
{
const char *base;
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+ if (isalpha (name[0]) && name[1] == ':')
name += 2;
#endif
for (base = name; *name; name++)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return base;
-}
-
-int
-check_executable(const char * path)
-{
- struct stat st;
-
- DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0) &&
- (
- /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
- ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
- ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
- ((st.st_mode & S_IXUSR) == S_IXUSR))
- )
- return 1;
- else
- return 0;
+ return (char *) base;
}
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise */
char *
-find_executable (const char* wrapper)
+fnqualify(const char *path)
{
- int has_slash = 0;
- const char* p;
- const char* p_next;
- /* static buffer for getcwd */
+ size_t size;
+ char *p;
char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char* concat_name;
- DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+ assert(path != NULL);
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
+ /* Is it qualified already? */
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
+ if (isalpha (path[0]) && path[1] == ':')
+ return xstrdup (path);
#endif
+ if (IS_DIR_SEPARATOR (path[0]))
+ return xstrdup (path);
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char* path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char* q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR(*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
+ /* prepend the current directory */
+ /* doesn't handle '~' */
if (getcwd (tmp, LT_PATHMAX) == NULL)
lt_fatal ("getcwd failed");
- tmp_len = strlen(tmp);
- concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable(concat_name))
- return concat_name;
- XFREE(concat_name);
- return NULL;
+ size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+ p = XMALLOC(char, size);
+ sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+ return p;
}
char *
va_end (ap);
}
EOF
- # we should really use a build-platform specific compiler
- # here, but OTOH, the wrappers (shell script and this C one)
- # are only useful if you want to execute the "real" binary.
- # Since the "real" binary is built for $host, then this
- # wrapper might as well be built for $host, too.
- $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
- ;;
- esac
- $rm $output
- trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
$run ${rm}r "$gentop"
$show "$mkdir $gentop"
$run $mkdir "$gentop"
- exit_status=$?
- if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
- exit $exit_status
+ status=$?
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
+ exit $status
fi
fi
outputname=
if test "$fast_install" = no && test -n "$relink_command"; then
if test "$finalize" = yes && test -z "$run"; then
- tmpdir=`func_mktempdir`
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ save_umask=`umask`
+ umask 0077
+ if $mkdir "$tmpdir"; then
+ umask $save_umask
+ else
+ umask $save_umask
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
# Exit here if they wanted silent mode.
test "$show" = : && exit $EXIT_SUCCESS
- $echo "X----------------------------------------------------------------------" | $Xsed
+ $echo "----------------------------------------------------------------------"
$echo "Libraries have been installed in:"
for libdir in $libdirs; do
$echo " $libdir"
$echo
$echo "See any operating system documentation about shared libraries for"
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
- $echo "X----------------------------------------------------------------------" | $Xsed
+ $echo "----------------------------------------------------------------------"
exit $EXIT_SUCCESS
;;
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+ test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
+ if test "$mode" = uninstall; then
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
cmds=$postuninstall_cmds
IFS="$save_ifs"
fi
# FIXME: should reinstall the best remaining shared library.
- ;;
- esac
+ fi
fi
;;
# configuration. But we'll never go from static-only to shared-only.
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
+build_libtool_libs=no
+build_old_libs=yes
# ### END LIBTOOL TAG CONFIG: disable-shared
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
-#
-# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
-#
-# We have the following line for use by intltoolize:
-# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
+@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
-top_builddir = @top_builddir@
+top_builddir = ..
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
-datarootdir = @datarootdir@
libdir = @libdir@
-DATADIRNAME = @DATADIRNAME@
-itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+localedir = $(libdir)/locale
+gnulocaledir = $(datadir)/locale
+gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
install_sh = @install_sh@
-# Automake >= 1.8 provides @mkdir_p@.
-# Until it can be supposed, use the safe fallback:
-mkdir_p = $(install_sh) -d
+mkdir_p = @mkdir_p@
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
+CC = @CC@
+GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
-ALL_LINGUAS = @ALL_LINGUAS@
-
-PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+DEFS = @DEFS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+INCLUDES = -I.. -I$(top_srcdir)/intl
-USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
-
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
-EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+SOURCES =
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
+$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
-# This comment gets stripped out
-CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
-.SUFFIXES: .po .pox .gmo .mo .msg .cat
+.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
+
+.c.o:
+ $(COMPILE) $<
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
- $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+ $(MSGMERGE) $< $(top_builddir)/po/$(GETTEXT_PACKAGE).pot -o $*pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
- && rm -f $@ && gencat $@ $*.msg
+ && rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
-install: install-data
+install: install-exec install-data
+install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
- $(mkdir_p) $(DESTDIR)$(itlocaledir)
- linguas="$(USE_LINGUAS)"; \
- for lang in $$linguas; do \
- dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
- $(mkdir_p) $$dir; \
- if test -r $$lang.gmo; then \
- $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ if test -n "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
+ fi
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ case "$$cat" in \
+ *.gmo) destdir=$(gnulocaledir);; \
+ *) destdir=$(localedir);; \
+ esac; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
+ if test -n "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $$dir; \
else \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
- echo "installing $(srcdir)/$$lang.gmo as" \
- "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
- if test -r $$lang.gmo.m; then \
- $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ if test -r $$cat; then \
+ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
else \
- if test -r $(srcdir)/$$lang.gmo.m ; then \
- $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
- $$dir/$(GETTEXT_PACKAGE).mo.m; \
- echo "installing $(srcdir)/$$lang.gmo.m as" \
- "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+ fi; \
+ if test -r $$cat.m; then \
+ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+ else \
+ if test -r $(srcdir)/$$cat.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$cat.m \
+ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $(srcdir)/$$cat as" \
+ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
-
-# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
+ if test "$(PACKAGE)" = "glib"; then \
+ if test -n "$(MKINSTALLDIRS)"; then \
+ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
+ fi; \
+ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
+ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+ else \
+ : ; \
+ fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
- linguas="$(USE_LINGUAS)"; \
- for lang in $$linguas; do \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
- rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
done
-
-check: all $(GETTEXT_PACKAGE).pot
- rm -f missing notexist
- srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
- if [ -r missing -o -r notexist ]; then \
- exit 1; \
+ if test "$(PACKAGE)" = "glib"; then \
+ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
fi
+check: all
+
+dvi info tags TAGS ID:
+
mostlyclean:
- rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -fr *.o
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
- rm -f Makefile Makefile.in POTFILES stamp-it
- rm -f *.mo *.msg *.cat *.cat.m *.gmo
+ rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
- rm -f Makefile.in.in
+ rm -f $(GMOFILES)
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES)
+distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot
dists="$(DISTFILES)"; \
- extra_dists="$(EXTRA_DISTFILES)"; \
- for file in $$extra_dists; do \
- test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
- done; \
for file in $$dists; do \
- test -f $$file || file="$(srcdir)/$$file"; \
- ln $$file $(distdir) 2> /dev/null \
- || cp -p $$file $(distdir); \
+ ln $(srcdir)/$$file $(distdir) 2> /dev/null \
+ || cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
- linguas="$(USE_LINGUAS)"; \
- for lang in $$linguas; do \
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
fi; \
fi; \
else \
- echo "msgmerge for $$lang.gmo failed!"; \
+ echo "msgmerge for $$cat failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
-Makefile POTFILES: stamp-it
- @if test ! -f $@; then \
- rm -f stamp-it; \
- $(MAKE) stamp-it; \
- fi
-
-stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
- cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+# POTFILES is created from POTFILES.in by stripping comments, empty lines
+# and Intltool tags (enclosed in square brackets), and appending a full
+# relative path to them
+POTFILES: POTFILES.in
+ ( if test 'x$(srcdir)' != 'x.'; then \
+ posrcprefix='$(top_srcdir)/'; \
+ else \
+ posrcprefix="../"; \
+ fi; \
+ rm -f $@-t $@ \
+ && (sed -e '/^#/d' \
+ -e "s/^\[.*\] +//" \
+ -e '/^[ ]*$$/d' \
+ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
+ | sed -e '$$s/\\$$//') > $@-t \
+ && chmod a-w $@-t \
+ && mv $@-t $@ )
+
+Makefile: Makefile.in.in ../config.status POTFILES
+ cd .. \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
#include <config.h>
-#ifndef WITH_HILDON
+#define WITH_BT_LIBBLUEZ
+
+#ifdef WITH_BT_LIBBLUEZ
#include <unistd.h>
#include <stdlib.h>
#define _GNU_SOURCE
-#ifdef WITH_HILDON
+#ifdef WITH_HILDON_DBUS_BT
#include <libosso.h>
#include <osso-helplib.h>
#include <locale.h>
#include <sqlite3.h>
+#ifdef WITH_HILDON
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <hildon-widgets/hildon-program.h>
+#include <hildon-widgets/hildon-controlbar.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-color-button.h>
+#include <hildon-widgets/hildon-file-chooser-dialog.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-banner.h>
+#include <hildon-widgets/hildon-input-mode-hint.h>
+#include <device_symbols.h>
+#endif
+
#include "utils.h"
#include "poi.h"
#include "route.h"
****************************************************************************/
#define _GNU_SOURCE
-#ifndef WITH_HILDON
+#include "config.h"
#include <gtk/gtk.h>
#include "ui-common.h"
+#ifndef WITH_HILDON
+
static gint _sb_sid=0;
GtkWidget *hildon_file_chooser_dialog_new(GtkWindow * parent,
#ifdef WITH_HILDON
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+
+#include "iap.h"
+#include "map.h"
+#include "gps.h"
+
+gboolean iap_connecting=FALSE;
+gboolean iap_connected=FALSE;
+
void iap_callback(struct iap_event_t *event, void *arg)
{
printf("%s()\n", __PRETTY_FUNCTION__);
- _iap_connecting = FALSE;
- if (event->type == OSSO_IAP_CONNECTED && !_iap_connected) {
- _iap_connected = TRUE;
+ iap_connecting = FALSE;
+ if (event->type == OSSO_IAP_CONNECTED && !iap_connected) {
+ iap_connected = TRUE;
config_update_proxy();
if (!_curl_sid)
_curl_sid = g_timeout_add(100,
printf(" > iap_state = %s\n", iap_state);
if (!strcmp(iap_state, "CONNECTED")) {
- if (!_iap_connected) {
- _iap_connected = TRUE;
+ if (!iap_connected) {
+ iap_connected = TRUE;
config_update_proxy();
if (!_curl_sid)
_curl_sid = g_timeout_add(100,
curl_download_timeout,
NULL);
}
- } else if (_iap_connected) {
- _iap_connected = FALSE;
+ } else if (iap_connected) {
+ iap_connected = FALSE;
if (_curl_sid) {
g_source_remove(_curl_sid);
_curl_sid = 0;
return DBUS_HANDLER_RESULT_HANDLED;
}
+void
+iap_connect(void)
+{
+if (!iap_connected && !iap_connecting) {
+ iap_connecting = TRUE;
+ osso_iap_connect(OSSO_IAP_ANY, OSSO_IAP_REQUESTED_CONNECT, NULL);
+}
+}
+
+gboolean
+iap_is_connected(void)
+{
+return iap_connected;
+}
+
#else
#endif
#include <osso-ic-dbus.h>
#include <osso-ic.h>
+#include "map.h"
+#include "route.h"
+#include "mapper-types.h"
+#include "bt.h"
+#include "gps.h"
+#include "settings-gconf.h"
+#include "settings.h"
+
void osso_cb_hw_state(osso_hw_state_t * state, gpointer data)
{
- static gboolean _must_save_data = FALSE;
- printf("%s()\n", __PRETTY_FUNCTION__);
+static gboolean _must_save_data = FALSE;
+printf("%s()\n", __PRETTY_FUNCTION__);
- if (state->system_inactivity_ind) {
- if (_must_save_data)
- _must_save_data = FALSE;
- else {
- if (_conn_state > RCVR_OFF) {
- GConfClient *gconf_client =
- gconf_client_get_default();
- if (!gconf_client
- || gconf_client_get_bool(gconf_client,
- GCONF_KEY_DISCONNECT_ON_COVER,
- NULL)) {
- gconf_client_clear_cache(gconf_client);
- g_object_unref(gconf_client);
- set_conn_state(RCVR_OFF);
- rcvr_disconnect();
- track_add(0, FALSE);
- /* Pretend autoroute is in progress to avoid download. */
- if (_autoroute_data.enabled)
- _autoroute_data.in_progress = TRUE;
- }
- }
- if (_curl_sid) {
- g_source_remove(_curl_sid);
- _curl_sid = 0;
+if (state->system_inactivity_ind) {
+ if (_must_save_data)
+ _must_save_data = FALSE;
+ else {
+ if (_conn_state > RCVR_OFF) {
+ GConfClient *gconf_client = gconf_client_get_default();
+ if (!gconf_client || gconf_client_get_bool(gconf_client,
+ GCONF_KEY_DISCONNECT_ON_COVER,
+ NULL)) {
+ gconf_client_clear_cache(gconf_client);
+ g_object_unref(gconf_client);
+ set_conn_state(RCVR_OFF);
+ rcvr_disconnect();
+ track_add(0, FALSE);
+ /* Pretend autoroute is in progress to avoid download. */
+ if (_autoroute_data.enabled)
+ _autoroute_data.in_progress = TRUE;
}
}
- } else if (state->save_unsaved_data_ind) {
- config_save();
- _must_save_data = TRUE;
- } else if (state->memory_low_ind) {
- /* Drop any memory we can.. */
- } else {
- if (_conn_state == RCVR_OFF && _enable_gps) {
- set_conn_state(RCVR_DOWN);
- rcvr_connect_later();
- if (_autoroute_data.enabled)
- _autoroute_data.in_progress = TRUE;
+ if (_curl_sid) {
+ g_source_remove(_curl_sid);
+ _curl_sid = 0;
}
-
- /* Start curl in case there are downloads pending. */
- if (_iap_connected && !_curl_sid)
- _curl_sid = g_timeout_add(100,
- (GSourceFunc)
- curl_download_timeout, NULL);
+ }
+} else if (state->save_unsaved_data_ind) {
+ config_save();
+ _must_save_data = TRUE;
+} else if (state->memory_low_ind) {
+ /* Drop any memory we can.. */
+} else {
+ if (_conn_state == RCVR_OFF && _enable_gps) {
+ set_conn_state(RCVR_DOWN);
+ rcvr_connect_later();
+ if (_autoroute_data.enabled)
+ _autoroute_data.in_progress = TRUE;
}
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+ /* Start curl in case there are downloads pending. */
+ if (iap_is_connected() && !_curl_sid)
+ _curl_sid = g_timeout_add(100,
+ (GSourceFunc)
+ curl_download_timeout, NULL);
+}
+vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
#else
#include <gconf/gconf-client.h>
#include <sqlite3.h>
+#ifdef WITH_HILDON
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <hildon-widgets/hildon-controlbar.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-color-button.h>
+#include <hildon-widgets/hildon-file-chooser-dialog.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-banner.h>
+#include <hildon-widgets/hildon-system-sound.h>
+#include <hildon-widgets/hildon-input-mode-hint.h>
+#endif
+
#include "utils.h"
#include "gps.h"
#include "map.h"
#ifdef WITH_HILDON
void con_check_connection(void)
{
-if (!_iap_connected && !_iap_connecting) {
- _iap_connecting = TRUE;
- osso_iap_connect(OSSO_IAP_ANY, OSSO_IAP_REQUESTED_CONNECT, NULL);
-}
+iap_connect();
}
#else
void con_check_connection(void)
g_tree_insert(_pui_tree, pui, pui);
#ifdef WITH_HILDON
- if (_iap_connected && !_curl_sid)
+ if (iap_is_connected() && !_curl_sid)
#endif
_curl_sid = g_timeout_add(100, (GSourceFunc) curl_download_timeout, NULL);
g_tree_steal(_downloading_tree, pui);
g_tree_insert(_pui_tree, pui, pui);
#ifdef WITH_HILDON
- if (_iap_connected && !_curl_sid)
+ if (iap_is_connected() && !_curl_sid)
#endif
_curl_sid = g_timeout_add(100,
(GSourceFunc)
#include <hildon-widgets/hildon-system-sound.h>
#include <hildon-widgets/hildon-input-mode-hint.h>
#include <device_symbols.h>
+#include "maemo-osso.h"
#endif
#include <libintl.h>
curl_multi_add_handle(_curl_multi, _autoroute_data.curl_easy);
#ifdef WITH_HILDON
- if (_iap_connected && !_curl_sid)
+ if (iap_is_connected() && !_curl_sid)
#else
if (!_curl_sid)
#endif
printf("%s()\n", __PRETTY_FUNCTION__);
#ifdef WITH_HILDON
- /* Connect to the internet pre-emptively to prevent lack thereof. */
- if (!_iap_connected && !_iap_connecting) {
- _iap_connecting = TRUE;
- osso_iap_connect(OSSO_IAP_ANY, OSSO_IAP_REQUESTED_CONNECT,
- NULL);
- }
+ iap_connect();
#endif
dialog = gtk_dialog_new_with_buttons(_("Download Route"),
g_signal_connect(G_OBJECT(oti.rad_use_text), "toggled",
G_CALLBACK(origin_type_selected), &oti);
-#ifdef WITH_HILDON
+#if 0
g_object_set(G_OBJECT(oti.txt_from), HILDON_AUTOCAP, FALSE, NULL);
g_object_set(G_OBJECT(oti.txt_to), HILDON_AUTOCAP, FALSE, NULL);
#endif
#include <locale.h>
#include <sqlite3.h>
+#ifdef WITH_HILDON
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+#include <bt-dbus.h>
+#include <hildon-widgets/hildon-program.h>
+#include <hildon-widgets/hildon-controlbar.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-color-button.h>
+#include <hildon-widgets/hildon-file-chooser-dialog.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-banner.h>
+#include <hildon-widgets/hildon-system-sound.h>
+#include <hildon-widgets/hildon-input-mode-hint.h>
+#include <device_symbols.h>
+#include "iap.h"
+#include "maemo-osso.h"
+#endif
+
#include "utils.h"
#include "poi.h"
#include "route.h"
item = gtk_separator_tool_item_new();
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+#ifndef WITH_HILDON
_toolbar_fullscreen_item = gtk_toggle_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), _toolbar_fullscreen_item, -1);
g_signal_connect (_toolbar_fullscreen_item, "clicked", G_CALLBACK (cb_fullscreen_click), NULL);
+#endif
item = gtk_separator_tool_item_new();
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
#ifdef WITH_HILDON
+#include <libosso.h>
+#include <hildon-widgets/hildon-program.h>
+
/** The main GtkWindow of the application. */
HildonProgram *_program;