]> err.no Git - mapper/commitdiff
Fixes so it builds for hildon. Not complete.
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 08:42:29 +0000 (11:42 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 08:42:29 +0000 (11:42 +0300)
16 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

index d5c066fa808461936db70f0d6b94b6a558eec83c..f6998edd3373a5215145406d7d211ce4cade57b3 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 986e88e37f59d299defeb7ddb32ecabad1649f23..afe00cf6c791d99e0583151e3669e4769f0c0400 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/scratchbox/tools/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.35.4";
+my $VERSION = "0.33";
 my $PACKAGE = "intltool";
 
 ## Loaded modules
@@ -80,8 +80,7 @@ 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
-"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";
@@ -90,13 +89,12 @@ my $buildin_gettext_support =
 $| = 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 
 (
@@ -123,10 +121,8 @@ 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 || $PKGNAME || "unknown";
+my $MODULE = $GETTEXT_PACKAGE || &FindPackageName;
 
 if ($POT_ARG)
 {
@@ -317,8 +313,7 @@ sub FindLeftoutFiles
        @buf_potfiles_ignore,
        @buf_allfiles,
        @buf_allfiles_sorted,
-       @buf_potfiles_sorted,
-        @buf_potfiles_ignore_sorted
+       @buf_potfiles_sorted
     );
 
     ## Search and find all translatable files
@@ -353,7 +348,7 @@ sub FindLeftoutFiles
        }
 
        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>)
        {
@@ -361,7 +356,7 @@ sub FindLeftoutFiles
        }
        close FILE;
 
-       @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
+       @buf_potfiles = (@buf_potfiles_ignore, @buf_potfiles);
     }
 
     foreach my $file (@buf_i18n_plain)
@@ -419,7 +414,7 @@ sub FindLeftoutFiles
                }
            }       
 
-           if (/\w\.GetString *\(QUOTEDTEXT/)
+           if (/\.GetString ?\(QUOTEDTEXT/)
            {
                 if (defined isNotValidMissing (unpack("x3 A*", $file))) {
                     ## Remove the first 3 chars and add newline
@@ -428,8 +423,7 @@ sub FindLeftoutFiles
                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
@@ -448,7 +442,7 @@ sub FindLeftoutFiles
        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";
@@ -492,11 +486,6 @@ sub FindLeftoutFiles
        $in2{$_} = 1;
     }
 
-    foreach (@buf_potfiles_ignore_sorted) 
-    {
-       $in2{$_} = 1;
-    }
-
     my @result;
 
     foreach (@buf_allfiles_sorted)
@@ -512,7 +501,7 @@ sub FindLeftoutFiles
     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, $_;
        }
@@ -545,7 +534,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. 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";
        }
     }
@@ -565,7 +554,7 @@ sub Console_WriteError_InvalidOption
 
 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"};
@@ -619,7 +608,7 @@ sub GenerateHeaders
 #
 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;
 
@@ -639,7 +628,7 @@ sub GeneratePOTemplate
     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;
@@ -679,8 +668,12 @@ sub GeneratePOTemplate
        } 
        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);
@@ -726,8 +719,6 @@ 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;
@@ -788,7 +779,7 @@ sub POFile_Update
 {
     -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;
@@ -831,16 +822,16 @@ sub POFile_GetLanguage ($)
 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;
 
@@ -855,7 +846,7 @@ sub Console_Write_CoverageReport
     foreach my $lang (@languages)
     {
        print "$lang: ";
-       system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
+       system ("$MSGFMT", "-o", "/dev/null", "--statistics", "$SRCDIR/$lang.po");
     }
 }
 
@@ -880,10 +871,8 @@ sub SubstituteVariable
     {
        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");
     }
     
@@ -1000,10 +989,10 @@ sub FindPackageName
        ($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) 
@@ -1011,18 +1000,19 @@ sub FindPackageName
        ($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;
 
@@ -1071,23 +1061,3 @@ 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 06823e057a578f95dabd0f233875dcf0553173c7..9e71d27d86d48ea79d31f3be040ec3933bd76623 100644 (file)
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -43,8 +43,8 @@ EXIT_FAILURE=1
 
 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.
@@ -132,8 +132,6 @@ run=
 show="$echo"
 show_help=
 execute_dlfiles=
-duplicate_deps=no
-preserve_args=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
@@ -141,43 +139,6 @@ 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'
 #
@@ -196,11 +157,12 @@ 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 /{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*)
@@ -333,9 +295,9 @@ func_extract_archives ()
       $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*)
@@ -390,8 +352,6 @@ 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
@@ -508,11 +468,7 @@ 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
@@ -544,18 +500,6 @@ 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.
@@ -912,9 +856,9 @@ EOF
       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
 
@@ -1117,7 +1061,6 @@ 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
@@ -1146,15 +1089,14 @@ 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
@@ -1329,11 +1271,6 @@ 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.
@@ -1417,8 +1354,8 @@ EOF
          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=
@@ -1482,17 +1419,13 @@ EOF
        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
@@ -1520,8 +1453,7 @@ EOF
          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"
          ;;
@@ -1535,15 +1467,10 @@ 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
@@ -1552,11 +1479,11 @@ EOF
       -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
            ;;
@@ -1568,15 +1495,6 @@ 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
@@ -1618,12 +1536,7 @@ 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
-      # -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.
@@ -1635,7 +1548,9 @@ EOF
        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
         ;;
 
@@ -1873,11 +1788,6 @@ 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.
@@ -1983,9 +1893,9 @@ EOF
     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
 
@@ -2048,6 +1958,7 @@ 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"
@@ -2283,7 +2194,7 @@ EOF
        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
 
@@ -2534,12 +2445,8 @@ 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 "$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
@@ -2652,15 +2559,11 @@ EOF
              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
@@ -3411,9 +3314,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
@@ -3466,12 +3369,7 @@ EOF
            ;;
          *-*-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.
@@ -3515,7 +3413,7 @@ EOF
          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
@@ -3560,7 +3458,7 @@ EOF
              # 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`
@@ -3807,35 +3705,6 @@ 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=
@@ -3919,7 +3788,6 @@ EOF
        fi
 
        lib="$output_objdir/$realname"
-       linknames=
        for link
        do
          linknames="$linknames $link"
@@ -4351,35 +4219,6 @@ 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"
 
@@ -4424,15 +4263,10 @@ 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
@@ -4549,22 +4383,10 @@ 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
 
@@ -4681,29 +4503,16 @@ static const void *lt_preloaded_setup() {
          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
@@ -4728,7 +4537,7 @@ static const void *lt_preloaded_setup() {
        # 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
@@ -4736,7 +4545,7 @@ static const void *lt_preloaded_setup() {
          $run $rm "$output_objdir/${outputname}S.${objext}"
        fi
 
-       exit $exit_status
+       exit $status
       fi
 
       if test -n "$shlibpath_var"; then
@@ -4876,12 +4685,10 @@ static const void *lt_preloaded_setup() {
        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
 
@@ -4906,9 +4713,6 @@ 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
@@ -4919,19 +4723,15 @@ EOF
 #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
@@ -4941,32 +4741,17 @@ 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);
-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, ...);
 
@@ -4976,50 +4761,29 @@ main (int argc, char *argv[])
   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;
 }
 
@@ -5040,148 +4804,48 @@ xstrdup (const char *string)
 ;
 }
 
-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 *
@@ -5225,16 +4889,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 $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
@@ -5464,9 +5128,9 @@ fi\
            $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
 
@@ -6133,7 +5797,18 @@ relink_command=\"$relink_command\""
          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.
@@ -6257,7 +5932,7 @@ relink_command=\"$relink_command\""
     # 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"
@@ -6290,7 +5965,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 "X----------------------------------------------------------------------" | $Xsed
+    $echo "----------------------------------------------------------------------"
     exit $EXIT_SUCCESS
     ;;
 
@@ -6507,17 +6182,9 @@ 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"
 
-         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
@@ -6550,8 +6217,7 @@ relink_command=\"$relink_command\""
              IFS="$save_ifs"
            fi
            # FIXME: should reinstall the best remaining shared library.
-           ;;
-         esac
+         fi
        fi
        ;;
 
@@ -6850,11 +6516,12 @@ exit $?
 # 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:
index 40c8833acfda5ead5a1029d4cd1617ae1d368336..22cadc654578ee49848b6defc4159cc50589c100 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@
-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@
@@ -52,30 +49,35 @@ 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
 
-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 $@ $<
@@ -86,7 +88,7 @@ CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$l
 
 .po.cat:
        sed -f ../intl/po2msg.sed < $< > $*.msg \
-         && rm -f $@ && gencat $@ $*.msg
+         && rm -f $@ && $(GENCAT) $@ $*.msg
 
 
 all: all-@USE_NLS@
@@ -97,91 +99,115 @@ all-no:
 $(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 \
@@ -197,20 +223,32 @@ update-po: Makefile
              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.
index 0f7a643f163e633bab7a94036842f8c72bd1899b..187378fd6db4fd377eecd3c79959f77dafb43666 100644 (file)
@@ -2,7 +2,9 @@
 
 #include <config.h>
 
-#ifndef WITH_HILDON
+#define WITH_BT_LIBBLUEZ
+
+#ifdef WITH_BT_LIBBLUEZ
 
 #include <unistd.h>
 #include <stdlib.h>
index fadc586b168e55ea67bd5a208cf80182a0425555..ed2e6dd79f6c3e16f81a2f6da7ed08d9fa4979d3 100644 (file)
@@ -2,7 +2,7 @@
 
 #define _GNU_SOURCE
 
-#ifdef WITH_HILDON
+#ifdef WITH_HILDON_DBUS_BT
 
 #include <libosso.h>
 #include <osso-helplib.h>
index 576540aefe8fff5d3e4a30c6634fbe7074b242e0..64e5eb23fd189bb4641c88581a4baa6455abdcc4 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 4810a2b5c050e0243c4b05db5dc24165632b25e0..9af2d45e5ba22b716a7cfc1cad6a163573528d34 100644 (file)
@@ -3,11 +3,13 @@
  ****************************************************************************/
 #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,
index 0cbeb5fb38e695ca655415b4a20b1c3f58973a59..7bdac9a31c1eb67c0a750e3d524fa6341f58ef7e 100644 (file)
--- a/src/iap.c
+++ b/src/iap.c
@@ -2,12 +2,24 @@
 
 #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,
@@ -45,8 +57,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,
@@ -54,8 +66,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;
@@ -67,6 +79,21 @@ 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 646b086a0bbddfedfcdd2d87e41264f82557ed2d..bbefb595e4157302ff7c556c735d6dfb15c4f7b3 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 (_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
index fb0fa44a1bb885f48a9a57d4e71e63680caac0c4..61dbdc9708203cd96438d2b10dc685b79e7e1df9 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 c9e914ee3efb0888c910757f4f6caadbb0072ce8..f4e5677922fcfe3a175b7fa88b73c68feb0ef541 100644 (file)
--- a/src/map.c
+++ b/src/map.c
@@ -515,10 +515,7 @@ gchar *map_construct_url(guint tilex, guint tiley, guint zoom)
 #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) 
@@ -563,7 +560,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_connected && !_curl_sid)
+       if (iap_is_connected() && !_curl_sid)
 #endif
                _curl_sid = g_timeout_add(100, (GSourceFunc) curl_download_timeout, NULL);
 
@@ -700,7 +697,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_connected && !_curl_sid)
+                       if (iap_is_connected() && !_curl_sid)
 #endif
                                _curl_sid = g_timeout_add(100,
                                                          (GSourceFunc)
index 85bcd451045e13e1fcdd5cb7f437d5914bc7e563..1aa3ee1ea2ad5acfe9765b768dc4709110761195 100644 (file)
@@ -61,6 +61,7 @@
 #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 6d4a1363c1ce44b5c5cf38d852ada2e729f24fdf..6b7e5d1478b857198a1b4c851de9b7feed1f2ab3 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_connected && !_curl_sid)
+       if (iap_is_connected() && !_curl_sid)
 #else
        if (!_curl_sid)
 #endif
@@ -245,12 +245,7 @@ gboolean route_download(gchar * to)
        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"),
@@ -342,7 +337,7 @@ gboolean route_download(gchar * to)
        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
index a7ef973dc7dc7f6efb38a9e21dcc1990beb568b6..b324f41e6273b5396f4946586b91ea2e0b963196 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"
@@ -751,9 +771,11 @@ 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 fd807e1e8f8e130f431415fa705e66a3920404ae..88339275b9a45d723e33a56f7c07cef379f91d54 100644 (file)
@@ -5,6 +5,9 @@
 
 #ifdef WITH_HILDON
 
+#include <libosso.h>
+#include <hildon-widgets/hildon-program.h>
+
 /** The main GtkWindow of the application. */
 HildonProgram *_program;