]> err.no Git - mapper/commitdiff
Merge
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 09:30:16 +0000 (12:30 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 09:30:16 +0000 (12:30 +0300)
17 files changed:
configure.ac
intltool-update
ltmain.sh
po/Makefile.in.in
src/bt-bluez.c
src/bt-maemo.c
src/cb.c
src/hildon-wrappers.c
src/iap.c
src/maemo-osso.c
src/map-repo.c
src/map.c
src/mapper.c
src/route.c
src/ui-common.c
src/ui-maemo.h
src/utils.c

index f6998edd3373a5215145406d7d211ce4cade57b3..d5c066fa808461936db70f0d6b94b6a558eec83c 100644 (file)
@@ -69,12 +69,12 @@ if test "x$HAVE_HILDON" = "xyes"; then
  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")
index afe00cf6c791d99e0583151e3669e4769f0c0400..986e88e37f59d299defeb7ddb32ecabad1649f23 100755 (executable)
@@ -1,4 +1,4 @@
-#!/scratchbox/tools/bin/perl -w
+#!/usr/bin/perl -w
 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
 
 #
@@ -30,7 +30,7 @@
 
 ## Release information
 my $PROGRAM = "intltool-update";
-my $VERSION = "0.33";
+my $VERSION = "0.35.4";
 my $PACKAGE = "intltool";
 
 ## Loaded modules
@@ -80,7 +80,8 @@ my $ini_support =
 "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
+"theme(?:\\.in)+|".    # http://www.freedesktop.org/Standards/icon-theme-spec
+"service(?:\\.in)+";    # DBus specific
 
 my $buildin_gettext_support = 
 "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
@@ -89,12 +90,13 @@ my $buildin_gettext_support =
 $| = 1;
 
 ## Sometimes the source tree will be rooted somewhere else.
-my $SRCDIR = ".";
+my $SRCDIR = $ENV{"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 
 (
@@ -121,8 +123,10 @@ my $arg_count = ($DIST_ARG > 0)
 
 &Console_Write_IntltoolHelp if $arg_count > 1;
 
+my $PKGNAME = FindPackageName ();
+
 # --version and --help don't require a module name
-my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
+my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
 
 if ($POT_ARG)
 {
@@ -313,7 +317,8 @@ sub FindLeftoutFiles
        @buf_potfiles_ignore,
        @buf_allfiles,
        @buf_allfiles_sorted,
-       @buf_potfiles_sorted
+       @buf_potfiles_sorted,
+        @buf_potfiles_ignore_sorted
     );
 
     ## Search and find all translatable files
@@ -348,7 +353,7 @@ sub FindLeftoutFiles
        }
 
        print "Found $ignore: Ignoring files...\n" if $VERBOSE;
-       open FILE, "<$ignore" or die "ERROR: Failed to open $ignore!\n";
+       open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
            
        while (<FILE>)
        {
@@ -356,7 +361,7 @@ sub FindLeftoutFiles
        }
        close FILE;
 
-       @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
+       @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
     }
 
     foreach my $file (@buf_i18n_plain)
@@ -414,7 +419,7 @@ sub FindLeftoutFiles
                }
            }       
 
-           if (/\.GetString ?\(QUOTEDTEXT/)
+           if (/\w\.GetString *\(QUOTEDTEXT/)
            {
                 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
                     ## Remove the first 3 chars and add newline
@@ -423,7 +428,8 @@ sub FindLeftoutFiles
                last;
            }
 
-           if (/_\(QUOTEDTEXT/)
+            ## N_ Q_ and _ are the three macros defined in gi8n.h
+           if (/[NQ]?_ *\(QUOTEDTEXT/)
            {
                 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
                     ## Remove the first 3 chars and add newline
@@ -442,7 +448,7 @@ sub FindLeftoutFiles
        while (<FILE>) 
        {
            # FIXME: share the pattern matching code with intltool-extract
-           if (/\s_(.*)=\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
+           if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
            {
                 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
                     push @buf_allfiles, unpack("x3 A*", $file) . "\n";
@@ -486,6 +492,11 @@ sub FindLeftoutFiles
        $in2{$_} = 1;
     }
 
+    foreach (@buf_potfiles_ignore_sorted) 
+    {
+       $in2{$_} = 1;
+    }
+
     my @result;
 
     foreach (@buf_allfiles_sorted)
@@ -501,7 +512,7 @@ sub FindLeftoutFiles
     foreach (@buf_potfiles_sorted)
     {
        chomp (my $dummy = $_);
-       if ("$dummy" ne "" and ! -f "../$dummy")
+       if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
        {
            push @buf_potfiles_notexist, $_;
        }
@@ -534,7 +545,7 @@ sub FindLeftoutFiles
            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 or POTFILES.skip. A file \e[1m'notexist'\e[0m\n".
+           warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
                 "containing this list of absent files has been written in the current directory.\n";
        }
     }
@@ -554,7 +565,7 @@ sub Console_WriteError_InvalidOption
 
 sub GenerateHeaders
 {
-    my $EXTRACT = "/home/milang/src/mapper/intltool-extract";
+    my $EXTRACT = "/data/repos/mapper/intltool-extract";
     chomp $EXTRACT;
 
     $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
@@ -608,7 +619,7 @@ sub GenerateHeaders
 #
 sub GeneratePOTemplate
 {
-    my $XGETTEXT = $ENV{"XGETTEXT"} || "/scratchbox/tools/bin/xgettext";
+    my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext";
     my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
     chomp $XGETTEXT;
 
@@ -628,7 +639,7 @@ sub GeneratePOTemplate
     my $gettext_support_nonascii = 0;
 
     # checks for GNU gettext >= 0.12
-    my $dummy = `$XGETTEXT --version --from-code=UTF-8 >/dev/null 2>/dev/null`;
+    my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
     if ($? == 0)
     {
        $gettext_support_nonascii = 1;
@@ -668,12 +679,8 @@ sub GeneratePOTemplate
        } 
        else 
        {
-           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);
+            print OUTFILE "$SRCDIR/../$_\n";
+           $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
        }
 
        next if (! $gettext_support_nonascii);
@@ -719,6 +726,8 @@ sub GeneratePOTemplate
                           "--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;
@@ -779,7 +788,7 @@ sub POFile_Update
 {
     -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
 
-    my $MSGMERGE = $ENV{"MSGMERGE"} || "/scratchbox/tools/bin/msgmerge";
+    my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge";
     my ($lang, $outfile) = @_;
 
     print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
@@ -822,16 +831,16 @@ sub POFile_GetLanguage ($)
 sub Console_Write_TranslationStatus
 {
     my ($lang, $output_file) = @_;
-    my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
+    my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
 
     $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
 
-    system ("$MSGFMT", "-o", "/dev/null", "--statistics", $output_file);
+    system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
 }
 
 sub Console_Write_CoverageReport
 {
-    my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
+    my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
 
     &GatherPOFiles;
 
@@ -846,7 +855,7 @@ sub Console_Write_CoverageReport
     foreach my $lang (@languages)
     {
        print "$lang: ";
-       system ("$MSGFMT", "-o", "/dev/null", "--statistics", "$SRCDIR/$lang.po");
+       system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
     }
 }
 
@@ -871,8 +880,10 @@ sub SubstituteVariable
     {
        my $rest = $3;
        my $untouched = $1;
-       my $sub = $varhash{$2};
-       
+       my $sub = "";
+        # Ignore recursive definitions of variables
+        $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+
        return SubstituteVariable ("$untouched$sub$rest");
     }
     
@@ -989,10 +1000,10 @@ sub FindPackageName
        ($name, $version) = ($1, $2);
        $name    =~ s/[\[\]\s]//g;
        $version =~ s/[\[\]\s]//g;
-       $varhash{"AC_PACKAGE_NAME"} = $name;
-       $varhash{"PACKAGE"} = $name;
-       $varhash{"AC_PACKAGE_VERSION"} = $version;
-       $varhash{"VERSION"} = $version;
+       $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}?/);
     }
     
     if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) 
@@ -1000,19 +1011,18 @@ sub FindPackageName
        ($name, $version) = ($1, $2);
        $name    =~ s/[\[\]\s]//g;
        $version =~ s/[\[\]\s]//g;
-       $varhash{"AC_PACKAGE_NAME"} = $name;
-       $varhash{"PACKAGE"} = $name;
-       $varhash{"AC_PACKAGE_VERSION"} = $version;
-       $varhash{"VERSION"} = $version;
+       $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}?/);
     }
 
     # \s makes this not work, why?
     $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
     
-    # prepend '$' to auto* internal variables, usually they are
-    # used in configure.in/ac without the '$'
-    $name =~ s/AC_/\$AC_/g;
-    $name =~ s/\$\$/\$/g;
+    # 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;
 
     $name = $domain if $domain;
 
@@ -1061,3 +1071,23 @@ sub FindMakevarsDomain
     
     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;
+}
index 9e71d27d86d48ea79d31f3be040ec3933bd76623..06823e057a578f95dabd0f233875dcf0553173c7 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -43,8 +43,8 @@ EXIT_FAILURE=1
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.5.20
-TIMESTAMP=" (1.1220.2.287 2005/08/31 18:54:15)"
+VERSION=1.5.22
+TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
 
 # See if we are running on zsh, and set the options which allow our
 # commands through without removal of \ escapes.
@@ -132,6 +132,8 @@ run=
 show="$echo"
 show_help=
 execute_dlfiles=
+duplicate_deps=no
+preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
@@ -139,6 +141,43 @@ 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'
 #
@@ -157,12 +196,11 @@ func_win32_libid ()
     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 /{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
+       $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
     fi
     ;;
   *DLL*)
@@ -295,9 +333,9 @@ func_extract_archives ()
       $run ${rm}r "$my_xdir"
       $show "$mkdir $my_xdir"
       $run $mkdir "$my_xdir"
-      status=$?
-      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
-       exit $status
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
+       exit $exit_status
       fi
       case $host in
       *-darwin*)
@@ -352,6 +390,8 @@ func_extract_archives ()
 # Darwin sucks
 eval std_shrext=\"$shrext_cmds\"
 
+disable_libs=no
+
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -468,7 +508,11 @@ do
     preserve_args="$preserve_args $arg"
     ;;
 
-  --tag) prevopt="--tag" prev=tag ;;
+  --tag)
+    prevopt="--tag"
+    prev=tag
+    preserve_args="$preserve_args --tag"
+    ;;
   --tag=*)
     set tag "$optarg" ${1+"$@"}
     shift
@@ -500,6 +544,18 @@ if test -n "$prevopt"; then
   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.
@@ -856,9 +912,9 @@ EOF
       if test ! -d "${xdir}$objdir"; then
        $show "$mkdir ${xdir}$objdir"
        $run $mkdir ${xdir}$objdir
-       status=$?
-       if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
-         exit $status
+       exit_status=$?
+       if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
+         exit $exit_status
        fi
       fi
 
@@ -1061,6 +1117,7 @@ EOF
     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
@@ -1089,14 +1146,15 @@ EOF
          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
@@ -1271,6 +1329,11 @@ EOF
                  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.
@@ -1354,8 +1417,8 @@ EOF
          prev=
          continue
          ;;
-        darwin_framework)
-         compiler_flags="$compiler_flags $arg"
+       darwin_framework|darwin_framework_skip)
+         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
          compile_command="$compile_command $arg"
          finalize_command="$finalize_command $arg"
          prev=
@@ -1419,13 +1482,17 @@ EOF
        continue
        ;;
 
-      -framework|-arch)
-        prev=darwin_framework
-        compiler_flags="$compiler_flags $arg"
+      -framework|-arch|-isysroot)
+       case " $CC " in
+         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
+               prev=darwin_framework_skip ;;
+         *) compiler_flags="$compiler_flags $arg"
+            prev=darwin_framework ;;
+       esac
        compile_command="$compile_command $arg"
        finalize_command="$finalize_command $arg"
-        continue
-        ;;
+       continue
+       ;;
 
       -inst-prefix-dir)
        prev=inst_prefix
@@ -1453,7 +1520,8 @@ EOF
          absdir=`cd "$dir" && pwd`
          if test -z "$absdir"; then
            $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-           exit $EXIT_FAILURE
+           absdir="$dir"
+           notinst_path="$notinst_path $dir"
          fi
          dir="$absdir"
          ;;
@@ -1467,10 +1535,15 @@ EOF
        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
@@ -1479,11 +1552,11 @@ EOF
       -l*)
        if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
          case $host in
-         *-*-cygwin* | *-*-pw32* | *-*-beos*)
+         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
            # These systems don't actually have a C or math library (as such)
            continue
            ;;
-         *-*-mingw* | *-*-os2*)
+         *-*-os2*)
            # These systems don't actually have a C library (as such)
            test "X$arg" = "X-lc" && continue
            ;;
@@ -1495,6 +1568,15 @@ EOF
            # 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
@@ -1536,7 +1618,12 @@ EOF
       # +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
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+      # -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*|@*)
 
        # Unknown arguments in both finalize_command and compile_command need
        # to be aesthetically quoted because they are evaled later.
@@ -1548,9 +1635,7 @@ EOF
        esac
         compile_command="$compile_command $arg"
         finalize_command="$finalize_command $arg"
-        if test "$with_gcc" = "yes" ; then
-          compiler_flags="$compiler_flags $arg"
-        fi
+        compiler_flags="$compiler_flags $arg"
         continue
         ;;
 
@@ -1788,6 +1873,11 @@ EOF
            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.
@@ -1893,9 +1983,9 @@ EOF
     if test ! -d "$output_objdir"; then
       $show "$mkdir $output_objdir"
       $run $mkdir $output_objdir
-      status=$?
-      if test "$status" -ne 0 && test ! -d "$output_objdir"; then
-       exit $status
+      exit_status=$?
+      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
+       exit $exit_status
       fi
     fi
 
@@ -1958,7 +2048,6 @@ EOF
     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"
@@ -2194,7 +2283,7 @@ EOF
        esac # case $deplib
        if test "$found" = yes || test -f "$lib"; then :
        else
-         $echo "$modename: cannot find the library \`$lib'" 1>&2
+         $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
          exit $EXIT_FAILURE
        fi
 
@@ -2445,8 +2534,12 @@ EOF
        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 "$prefer_static_libs" = no || test -z "$old_library"; }; then
+          { test "$use_static_libs" = no || test -z "$old_library"; }; then
          if test "$installed" = no; then
            notinst_deplibs="$notinst_deplibs $lib"
            need_relink=yes
@@ -2559,11 +2652,15 @@ EOF
              if test "$hardcode_direct" = no; then
                add="$dir/$linklib"
                case $host in
-                 *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+                   *-*-unixware7*) 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
@@ -3314,9 +3411,9 @@ EOF
 
       # 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
@@ -3369,7 +3466,12 @@ EOF
            ;;
          *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
            # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
+           ;;
+         *-*-sco3.2v5* | *-*-sco5v6*)
+           # Causes problems with __ctype
+           ;;
+         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+           # Compiler inserts libc in the correct place for threads to work
            ;;
          *)
            # Add libc to deplibs on all other systems if necessary.
@@ -3413,7 +3515,7 @@ EOF
          int main() { return 0; }
 EOF
          $rm conftest
-         $LTCC -o conftest conftest.c $deplibs
+         $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
          if test "$?" -eq 0 ; then
            ldd_output=`ldd conftest`
            for i in $deplibs; do
@@ -3458,7 +3560,7 @@ EOF
              # If $name is empty we are operating on a -L argument.
               if test "$name" != "" && test "$name" != "0"; then
                $rm conftest
-               $LTCC -o conftest conftest.c $i
+               $LTCC $LTCFLAGS -o conftest conftest.c $i
                # Did it work?
                if test "$?" -eq 0 ; then
                  ldd_output=`ldd conftest`
@@ -3705,6 +3807,35 @@ EOF
        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=
@@ -3788,6 +3919,7 @@ EOF
        fi
 
        lib="$output_objdir/$realname"
+       linknames=
        for link
        do
          linknames="$linknames $link"
@@ -4219,6 +4351,35 @@ EOF
         ;;
       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"
 
@@ -4263,10 +4424,15 @@ EOF
        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
@@ -4383,10 +4549,22 @@ extern \"C\" {
              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
 
@@ -4503,16 +4681,29 @@ static const void *lt_preloaded_setup() {
          esac
 
          # Now compile the dynamic symbol file.
-         $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 $?
+         $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 $?
 
          # 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.
-         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}%"`
+          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
          ;;
        *)
          $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
@@ -4537,7 +4728,7 @@ static const void *lt_preloaded_setup() {
        # We have no uninstalled library dependencies, so finalize right now.
        $show "$link_command"
        $run eval "$link_command"
-       status=$?
+       exit_status=$?
 
        # Delete the generated files.
        if test -n "$dlsyms"; then
@@ -4545,7 +4736,7 @@ static const void *lt_preloaded_setup() {
          $run $rm "$output_objdir/${outputname}S.${objext}"
        fi
 
-       exit $status
+       exit $exit_status
       fi
 
       if test -n "$shlibpath_var"; then
@@ -4685,10 +4876,12 @@ static const void *lt_preloaded_setup() {
        esac
        case $host in
          *cygwin* | *mingw* )
-           cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
-           cwrapper=`$echo ${output}.exe`
-           $rm $cwrappersource $cwrapper
-           trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+            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
 
            cat > $cwrappersource <<EOF
 
@@ -4713,6 +4906,9 @@ 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
@@ -4723,15 +4919,19 @@ EOF
 #endif
 
 #ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
+# define DIR_SEPARATOR '/'
+# define PATH_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
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
 #endif
 
 #ifndef DIR_SEPARATOR_2
@@ -4741,17 +4941,32 @@ EOF
         (((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);
-char * basename (const char *name);
-char * fnqualify(const char *path);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int    check_executable(const char *path);
 char * strendzap(char *str, const char *pat);
 void lt_fatal (const char *message, ...);
 
@@ -4761,29 +4976,50 @@ main (int argc, char *argv[])
   char **newargz;
   int i;
 
-  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  DEBUG("(main) argv[0]      : %s\n",argv[0]);
+  DEBUG("(main) program_name : %s\n",program_name);
   newargz = XMALLOC(char *, argc+2);
 EOF
 
-           cat >> $cwrappersource <<EOF
-  newargz[0] = "$SHELL";
+            cat >> $cwrappersource <<EOF
+  newargz[0] = (char *) xstrdup("$SHELL");
 EOF
 
-           cat >> $cwrappersource <<"EOF"
-  newargz[1] = fnqualify(argv[0]);
+            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]);
   /* 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
 
-           cat >> $cwrappersource <<EOF
+            case $host_os in
+              mingw*)
+                cat >> $cwrappersource <<EOF
+  execv("$SHELL",(char const **)newargz);
+EOF
+              ;;
+              *)
+                cat >> $cwrappersource <<EOF
   execv("$SHELL",newargz);
 EOF
+              ;;
+            esac
 
-           cat >> $cwrappersource <<"EOF"
+            cat >> $cwrappersource <<"EOF"
   return 127;
 }
 
@@ -4804,48 +5040,148 @@ xstrdup (const char *string)
 ;
 }
 
-char *
-basename (const char *name)
+const char *
+base_name (const char *name)
 {
   const char *base;
 
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
   /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha (name[0]) && name[1] == ':')
+  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
     name += 2;
 #endif
 
   for (base = name; *name; name++)
     if (IS_DIR_SEPARATOR (*name))
       base = name + 1;
-  return (char *) base;
+  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;
 }
 
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise */
 char *
-fnqualify(const char *path)
+find_executable (const char* wrapper)
 {
-  size_t size;
-  char *p;
+  int has_slash = 0;
+  const char* p;
+  const char* p_next;
+  /* static buffer for getcwd */
   char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char* concat_name;
 
-  assert(path != NULL);
+  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
 
-  /* Is it qualified already? */
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha (path[0]) && path[1] == ':')
-    return xstrdup (path);
+  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)
+  }
 #endif
-  if (IS_DIR_SEPARATOR (path[0]))
-    return xstrdup (path);
 
-  /* prepend the current directory */
-  /* doesn't handle '~' */
+  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 */
   if (getcwd (tmp, LT_PATHMAX) == NULL)
     lt_fatal ("getcwd failed");
-  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;
+  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;
 }
 
 char *
@@ -4889,16 +5225,16 @@ lt_fatal (const char *message, ...)
   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 -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 $LTCFLAGS -s -o $cwrapper $cwrappersource
+          ;;
+        esac
+        $rm $output
+        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
 
        $echo > $output "\
 #! $SHELL
@@ -5128,9 +5464,9 @@ fi\
            $run ${rm}r "$gentop"
            $show "$mkdir $gentop"
            $run $mkdir "$gentop"
-           status=$?
-           if test "$status" -ne 0 && test ! -d "$gentop"; then
-             exit $status
+           exit_status=$?
+           if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
+             exit $exit_status
            fi
          fi
 
@@ -5797,18 +6133,7 @@ relink_command=\"$relink_command\""
          outputname=
          if test "$fast_install" = no && test -n "$relink_command"; then
            if test "$finalize" = yes && test -z "$run"; then
-             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
+             tmpdir=`func_mktempdir`
              file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
              outputname="$tmpdir/$file"
              # Replace the output file specification.
@@ -5932,7 +6257,7 @@ relink_command=\"$relink_command\""
     # Exit here if they wanted silent mode.
     test "$show" = : && exit $EXIT_SUCCESS
 
-    $echo "----------------------------------------------------------------------"
+    $echo "X----------------------------------------------------------------------" | $Xsed
     $echo "Libraries have been installed in:"
     for libdir in $libdirs; do
       $echo "   $libdir"
@@ -5965,7 +6290,7 @@ relink_command=\"$relink_command\""
     $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 "----------------------------------------------------------------------"
+    $echo "X----------------------------------------------------------------------" | $Xsed
     exit $EXIT_SUCCESS
     ;;
 
@@ -6182,9 +6507,17 @@ relink_command=\"$relink_command\""
            rmfiles="$rmfiles $objdir/$n"
          done
          test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-         test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
 
-         if test "$mode" = uninstall; then
+         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 -n "$library_names"; then
              # Do each command in the postuninstall commands.
              cmds=$postuninstall_cmds
@@ -6217,7 +6550,8 @@ relink_command=\"$relink_command\""
              IFS="$save_ifs"
            fi
            # FIXME: should reinstall the best remaining shared library.
-         fi
+           ;;
+         esac
        fi
        ;;
 
@@ -6516,12 +6850,11 @@ exit $?
 # configuration.  But we'll never go from static-only to shared-only.
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
+disable_libs=shared
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+disable_libs=static
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
index 22cadc654578ee49848b6defc4159cc50589c100..40c8833acfda5ead5a1029d4cd1617ae1d368336 100644 (file)
 #
 # - 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@
-localedir = $(libdir)/locale
-gnulocaledir = $(datadir)/locale
-gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 subdir = po
 install_sh = @install_sh@
-mkdir_p = @mkdir_p@
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 
-CC = @CC@
-GENCAT = @GENCAT@
 GMSGFMT = @GMSGFMT@
 MSGFMT = @MSGFMT@
 XGETTEXT = @XGETTEXT@
@@ -49,35 +52,30 @@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 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
 
-DEFS = @DEFS@
-CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
 
-INCLUDES = -I.. -I$(top_srcdir)/intl
+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)
 
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+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)
 
-SOURCES = 
-POFILES = @POFILES@
-GMOFILES = @GMOFILES@
-DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
-$(POFILES) $(GMOFILES) $(SOURCES)
+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
 
 POTFILES = \
+# This comment gets stripped out
 
-CATALOGS = @CATALOGS@
-CATOBJEXT = @CATOBJEXT@
-INSTOBJEXT = @INSTOBJEXT@
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
 
 .SUFFIXES:
-.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
-
-.c.o:
-       $(COMPILE) $<
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
 .po.pox:
        $(MAKE) $(GETTEXT_PACKAGE).pot
-       $(MSGMERGE) $< $(top_builddir)/po/$(GETTEXT_PACKAGE).pot -o $*pox
+       $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
 .po.mo:
        $(MSGFMT) -o $@ $<
@@ -88,7 +86,7 @@ INSTOBJEXT = @INSTOBJEXT@
 
 .po.cat:
        sed -f ../intl/po2msg.sed < $< > $*.msg \
-         && rm -f $@ && $(GENCAT) $@ $*.msg
+         && rm -f $@ && gencat $@ $*.msg
 
 
 all: all-@USE_NLS@
@@ -99,115 +97,91 @@ all-no:
 $(GETTEXT_PACKAGE).pot: $(POTFILES)
        $(GENPOT)
 
-install: install-exec install-data
-install-exec:
+install: install-data
 install-data: install-data-@USE_NLS@
 install-data-no: all
 install-data-yes: all
-       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; \
+       $(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"; \
          else \
-           $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+           $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+           echo "installing $(srcdir)/$$lang.gmo as" \
+                "$$dir/$(GETTEXT_PACKAGE).mo"; \
          fi; \
-         if test -r $$cat; then \
-           $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
-           echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
+         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"; \
          else \
-           $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
-           echo "installing $(srcdir)/$$cat as" \
-                "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
-         fi; \
-         if test -r $$cat.m; then \
-           $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
-           echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
-         else \
-           if test -r $(srcdir)/$$cat.m ; then \
-             $(INSTALL_DATA) $(srcdir)/$$cat.m \
-               $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
-             echo "installing $(srcdir)/$$cat as" \
-                  "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
+           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"; \
            else \
              true; \
            fi; \
          fi; \
        done
-       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
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
 
 # Define this as empty until I found a useful application.
 installcheck:
 
 uninstall:
-       catalogs='$(CATALOGS)'; \
-       for cat in $$catalogs; do \
-         cat=`basename $$cat`; \
-         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
-         rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
-         rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
-         rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
-         rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
+       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; \
        done
-       if test "$(PACKAGE)" = "glib"; then \
-         rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
-       fi
 
-check: all
-
-dvi info tags TAGS ID:
+check: all $(GETTEXT_PACKAGE).pot
+       rm -f missing notexist
+       srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+       if [ -r missing -o -r notexist ]; then \
+         exit 1; \
+       fi
 
 mostlyclean:
-       rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
-       rm -fr *.o
+       rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
        rm -f .intltool-merge-cache
 
 clean: mostlyclean
 
 distclean: clean
-       rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
+       rm -f Makefile Makefile.in POTFILES stamp-it
+       rm -f *.mo *.msg *.cat *.cat.m *.gmo
 
 maintainer-clean: distclean
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
-       rm -f $(GMOFILES)
+       rm -f Makefile.in.in
 
-distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
        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 \
-         ln $(srcdir)/$$file $(distdir) 2> /dev/null \
-           || cp -p $(srcdir)/$$file $(distdir); \
+         test -f $$file || file="$(srcdir)/$$file"; \
+         ln $$file $(distdir) 2> /dev/null \
+           || cp -p $$file $(distdir); \
        done
 
 update-po: Makefile
        $(MAKE) $(GETTEXT_PACKAGE).pot
        tmpdir=`pwd`; \
-       catalogs='$(CATALOGS)'; \
-       for cat in $$catalogs; do \
-         cat=`basename $$cat`; \
-         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+       linguas="$(USE_LINGUAS)"; \
+       for lang in $$linguas; do \
          echo "$$lang:"; \
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
          if $$result; then \
@@ -223,32 +197,20 @@ update-po: Makefile
              fi; \
            fi; \
          else \
-           echo "msgmerge for $$cat failed!"; \
+           echo "msgmerge for $$lang.gmo failed!"; \
            rm -f $$tmpdir/$$lang.new.po; \
          fi; \
        done
 
-# POTFILES is created from POTFILES.in by stripping comments, empty lines
-# and Intltool tags (enclosed in square brackets), and appending a full
-# relative path to them
-POTFILES: POTFILES.in
-       ( if test 'x$(srcdir)' != 'x.'; then \
-           posrcprefix='$(top_srcdir)/'; \
-         else \
-           posrcprefix="../"; \
-         fi; \
-         rm -f $@-t $@ \
-           && (sed -e '/^#/d'                                          \
-                   -e "s/^\[.*\] +//"                                  \
-                   -e '/^[     ]*$$/d'                                 \
-                   -e "s@.*@   $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
-               | sed -e '$$s/\\$$//') > $@-t \
-           && chmod a-w $@-t \
-           && mv $@-t $@ )
-
-Makefile: Makefile.in.in ../config.status POTFILES
-       cd .. \
-         && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+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= \
               $(SHELL) ./config.status
 
 # Tell versions [3.59,3.63) of GNU make not to export all variables.
index 187378fd6db4fd377eecd3c79959f77dafb43666..0f7a643f163e633bab7a94036842f8c72bd1899b 100644 (file)
@@ -2,9 +2,7 @@
 
 #include <config.h>
 
-#define WITH_BT_LIBBLUEZ
-
-#ifdef WITH_BT_LIBBLUEZ
+#ifndef WITH_HILDON
 
 #include <unistd.h>
 #include <stdlib.h>
index ed2e6dd79f6c3e16f81a2f6da7ed08d9fa4979d3..fadc586b168e55ea67bd5a208cf80182a0425555 100644 (file)
@@ -2,7 +2,7 @@
 
 #define _GNU_SOURCE
 
-#ifdef WITH_HILDON_DBUS_BT
+#ifdef WITH_HILDON
 
 #include <libosso.h>
 #include <osso-helplib.h>
index 64e5eb23fd189bb4641c88581a4baa6455abdcc4..576540aefe8fff5d3e4a30c6634fbe7074b242e0 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
 #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"
index 9af2d45e5ba22b716a7cfc1cad6a163573528d34..4810a2b5c050e0243c4b05db5dc24165632b25e0 100644 (file)
@@ -3,13 +3,11 @@
  ****************************************************************************/
 #define _GNU_SOURCE
 
-#include "config.h"
+#ifndef WITH_HILDON
 
 #include <gtk/gtk.h>
 #include "ui-common.h"
 
-#ifndef WITH_HILDON
-
 static gint _sb_sid=0;
 
 GtkWidget *hildon_file_chooser_dialog_new(GtkWindow * parent,
index 7bdac9a31c1eb67c0a750e3d524fa6341f58ef7e..0cbeb5fb38e695ca655415b4a20b1c3f58973a59 100644 (file)
--- a/src/iap.c
+++ b/src/iap.c
@@ -2,24 +2,12 @@
 
 #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,
@@ -57,8 +45,8 @@ get_connection_status_signal_cb(DBusConnection * connection,
 
        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,
@@ -66,8 +54,8 @@ get_connection_status_signal_cb(DBusConnection * connection,
                                                          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;
@@ -79,21 +67,6 @@ get_connection_status_signal_cb(DBusConnection * connection,
        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
index bbefb595e4157302ff7c556c735d6dfb15c4f7b3..646b086a0bbddfedfcdd2d87e41264f82557ed2d 100644 (file)
 #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 (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 (_curl_sid) {
-                       g_source_remove(_curl_sid);
-                       _curl_sid = 0;
+       } 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;
                }
-       }
-} 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;
+
+               /* Start curl in case there are downloads pending. */
+               if (_iap_connected && !_curl_sid)
+                       _curl_sid = g_timeout_add(100,
+                                                 (GSourceFunc)
+                                                 curl_download_timeout, NULL);
        }
 
-       /* 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__);
+       vprintf("%s(): return\n", __PRETTY_FUNCTION__);
 }
 
 #else
index 61dbdc9708203cd96438d2b10dc685b79e7e1df9..fb0fa44a1bb885f48a9a57d4e71e63680caac0c4 100644 (file)
 #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"
index f4e5677922fcfe3a175b7fa88b73c68feb0ef541..c9e914ee3efb0888c910757f4f6caadbb0072ce8 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -515,7 +515,10 @@ gchar *map_construct_url(guint tilex, guint tiley, guint zoom)
 #ifdef WITH_HILDON
 void con_check_connection(void)
 {
-iap_connect();
+if (!_iap_connected && !_iap_connecting) {
+       _iap_connecting = TRUE;
+       osso_iap_connect(OSSO_IAP_ANY, OSSO_IAP_REQUESTED_CONNECT, NULL);
+}
 }
 #else
 void con_check_connection(void) 
@@ -560,7 +563,7 @@ void map_initiate_download(guint tilex, guint tiley, guint zoom, gint retries)
 
        g_tree_insert(_pui_tree, pui, pui);
 #ifdef WITH_HILDON
-       if (iap_is_connected() && !_curl_sid)
+       if (_iap_connected && !_curl_sid)
 #endif
                _curl_sid = g_timeout_add(100, (GSourceFunc) curl_download_timeout, NULL);
 
@@ -697,7 +700,7 @@ gboolean map_download_idle_refresh(ProgressUpdateInfo * pui)
                        g_tree_steal(_downloading_tree, pui);
                        g_tree_insert(_pui_tree, pui, pui);
 #ifdef WITH_HILDON
-                       if (iap_is_connected() && !_curl_sid)
+                       if (_iap_connected && !_curl_sid)
 #endif
                                _curl_sid = g_timeout_add(100,
                                                          (GSourceFunc)
index 1aa3ee1ea2ad5acfe9765b768dc4709110761195..85bcd451045e13e1fcdd5cb7f437d5914bc7e563 100644 (file)
@@ -61,7 +61,6 @@
 #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>
index 6b7e5d1478b857198a1b4c851de9b7feed1f2ab3..6d4a1363c1ce44b5c5cf38d852ada2e729f24fdf 100644 (file)
@@ -208,7 +208,7 @@ gboolean auto_route_dl_idle()
        curl_multi_add_handle(_curl_multi, _autoroute_data.curl_easy);
 
 #ifdef WITH_HILDON
-       if (iap_is_connected() && !_curl_sid)
+       if (_iap_connected && !_curl_sid)
 #else
        if (!_curl_sid)
 #endif
@@ -245,7 +245,12 @@ gboolean route_download(gchar * to)
        printf("%s()\n", __PRETTY_FUNCTION__);
 
 #ifdef WITH_HILDON
-       iap_connect();
+       /* 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);
+       }
 #endif
 
        dialog = gtk_dialog_new_with_buttons(_("Download Route"),
@@ -337,7 +342,7 @@ gboolean route_download(gchar * to)
        g_signal_connect(G_OBJECT(oti.rad_use_text), "toggled",
                         G_CALLBACK(origin_type_selected), &oti);
 
-#if 0
+#ifdef WITH_HILDON
        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
index b324f41e6273b5396f4946586b91ea2e0b963196..a7ef973dc7dc7f6efb38a9e21dcc1990beb568b6 100644 (file)
 #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"
@@ -771,11 +751,9 @@ g_signal_connect (item, "clicked", G_CALLBACK (cb_zoom_autozoom), NULL);
 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);
index 88339275b9a45d723e33a56f7c07cef379f91d54..fd807e1e8f8e130f431415fa705e66a3920404ae 100644 (file)
@@ -5,9 +5,6 @@
 
 #ifdef WITH_HILDON
 
-#include <libosso.h>
-#include <hildon-widgets/hildon-program.h>
-
 /** The main GtkWindow of the application. */
 HildonProgram *_program;
 
index 229e19b5dd52ce53d1c0d63bf8ab33b3d1ccea4b..43574cf65eb3b41051c157b087e67c1aa5199f31 100644 (file)
 void sound_noise(void)
 {
 #ifdef WITH_HILDON
-hildon_play_system_sound("/usr/share/sounds/ui-information_note.wav");
+       hildon_play_system_sound("/usr/share/sounds/ui-information_note.wav");
 #else
-gdk_beep();
+
 #endif
 }
 
 void sound_speak(gchar * phrase)
 {
-#ifdef WITH_ESPEAK
-#define _voice_synth_path "/usr/bin/espeak"
-#else
 #define _voice_synth_path "/usr/bin/flite"
-#endif
 
-if (!fork()) {
-       /* We are the fork child.  Synthesize the voice. */
-       sound_noise();
-       sleep(1);
-       printf("%s %s\n", _voice_synth_path, phrase);
-       execl(_voice_synth_path, _voice_synth_path, "-t", phrase, (char *)NULL);
-       exit(0);
-}
+#if WITH_HILDON
+       if (!fork()) {
+               /* We are the fork child.  Synthesize the voice. */
+               sound_noise();
+               sleep(1);
+               printf("%s %s\n", _voice_synth_path, _last_spoken_phrase);
+               execl(_voice_synth_path, _voice_synth_path,
+                     "-t", _last_spoken_phrase, (char *)NULL);
+               exit(0);
+       }
+#else
 
+#endif
 }
 
 #if 0