2005-11-09 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Wed, 9 Nov 2005 19:09:19 +0000 (19:09 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Wed, 9 Nov 2005 19:09:19 +0000 (19:09 -0000)
* unix/util.c (set_dirs): Instead of hardcoding the value to
/usr/bin, use MONO_BINDIR which comes from Automake's bindir.  If
the executable is in the place configured, use the Automake
settings.  Otherwise use the standard-layout based computed
paths.

svn path=/trunk/mono/; revision=52792

mono/os/ChangeLog
mono/os/unix/Makefile.am
mono/os/unix/util.c

index e5b3773770bdaede5c1374ab2286070755e554ff..2591b4d2e32ed8acf064406ba2ca2e086ad1beb3 100644 (file)
@@ -1,3 +1,11 @@
+2005-11-09  Miguel de Icaza  <miguel@novell.com>
+
+       * unix/util.c (set_dirs): Instead of hardcoding the value to
+       /usr/bin, use MONO_BINDIR which comes from Automake's bindir.  If
+       the executable is in the place configured, use the Automake
+       settings.  Otherwise use the standard-layout based computed
+       paths. 
+
 2005-11-08  Miguel de Icaza  <miguel@novell.com>
 
        * unix/util.c (set_dirs): The buffer is overwritten by the
index d08b353ef0e47a78846555366065db99c87bd811..c8ca761426a33d2273f9b0248c8d501bd9a33176 100644 (file)
@@ -9,7 +9,7 @@ assembliesdir = $(exec_prefix)/lib
 confdir = $(sysconfdir)
 endif
 
-INCLUDES = -I$(top_srcdir) -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\" $(GLIB_CFLAGS) 
+INCLUDES = -I$(top_srcdir) -DMONO_BINDIR=\"$(bindir)/\" -DMONO_ASSEMBLIES=\"$(assembliesdir)\" -DMONO_CFG_DIR=\"$(confdir)\" $(GLIB_CFLAGS) 
 
 noinst_LTLIBRARIES = libmonoos.la
 
index cff3202db52260bd3051590249e6156d8e917a86..8115c6bdfdef0515d72813c6292d2c568e7138e9 100644 (file)
@@ -47,7 +47,7 @@ set_dirs (char *exe)
        /*
         * Only /usr prefix is treated specially
         */
-       if (strncmp (exe, "/usr/bin/", 9) == 0 || (base = compute_base (exe)) == NULL){
+       if (strncmp (exe, MONO_BINDIR, strlen (MONO_BINDIR)) == 0 || (base = compute_base (exe)) == NULL){
                fallback ();
                return;
        } else {