Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Make MultiSource/Applications/sqlite3/speedtest.tcl portable. #8264

Open Quuxplusone opened 14 years ago

Quuxplusone commented 14 years ago
Bugzilla Link PR7871
Status CONFIRMED
Importance P normal
Reported by Pawel Worach (pawel.worach@gmail.com)
Reported on 2010-08-11 03:06:30 -0700
Last modified on 2015-03-23 17:34:02 -0700
Version trunk
Hardware PC FreeBSD
CC llvm-bugs@lists.llvm.org, lyeskriaa@gmail.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
FreeBSD installs TCL in /usr/local/bin.

Index: MultiSource/Applications/sqlite3/speedtest.tcl
===================================================================
--- MultiSource/Applications/sqlite3/speedtest.tcl  (revision 110776)
+++ MultiSource/Applications/sqlite3/speedtest.tcl  (working copy)
@@ -1,4 +1,4 @@
-#!/usr/bin/tclsh
+#!/usr/bin/env tclsh
 #
 # Run this script using TCLSH to do a speed comparison between
 # various versions of SQLite and PostgreSQL and MySQL
Quuxplusone commented 14 years ago
Actually forget that patch, the problem is that llvm/configure doesn't find
tclsh on freebsd, the default version is tclsh8.5 which is not checked for and
TCLSH is not set so the script is executed without with an empty prefix (and
because it is not +x it fails anyway with the patch in comment 0).

So how about something like this ?

Index: autoconf/m4/path_tclsh.m4
===================================================================
--- autoconf/m4/path_tclsh.m4   (revision 110730)
+++ autoconf/m4/path_tclsh.m4   (working copy)
@@ -24,7 +24,7 @@
 dnl see if one is installed
 if test x"${ac_cv_path_tclsh}" = x ; then
   AC_MSG_RESULT(none)
-  AC_PATH_PROGS([TCLSH],[tclsh8.4 tclsh8.4.8 tclsh8.4.7 tclsh8.4.6 tclsh8.4.5
tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0 tclsh8.3 tclsh8.3.5
tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0 tclsh])
+  AC_PATH_PROGS([TCLSH],[tclsh8.6 tclsh8.5 tclsh8.4 tclsh8.4.8 tclsh8.4.7
tclsh8.4.6 tclsh8.4.5 tclsh8.4.4 tclsh8.4.3 tclsh8.4.2 tclsh8.4.1 tclsh8.4.0
tclsh8.3 tclsh8.3.5 tclsh8.3.4 tclsh8.3.3 tclsh8.3.2 tclsh8.3.1 tclsh8.3.0
tclsh])
   if test x"${TCLSH}" = x ; then
     ac_cv_path_tclsh='';
   else