Patchwork Re: Stop using "which" in ./configure

login
register
mail settings
Submitter Loïc Minier
Date Jan. 28, 2010, 8:33 p.m.
Message ID <20100128203329.GA21388@bee.dooz.org>
Download mbox | patch
Permalink /patch/43878/
State New
Headers show

Comments

Loïc Minier - Jan. 28, 2010, 8:33 p.m.
On Wed, Jan 27, 2010, Blue Swirl wrote:
> That must've been it. But I get this on Milax:

 I didn't know about MilaX; I had a hard time getting gcc/binutils (or
 event git) to work along with working headers or base libs such as
 zlib.h or unistd.h.  Do you have any instructions on how to get these
 working?

> config-host.mak is out-of-date, running configure
> /bin/ginstall: cannot stat `=': No such file or directory

 Ok; this was a typo in the Solaris patch (note that I was reluctant to
 touch the Solaris code in the first place); I could reproduce and also
 noticed that /bin/sh on MilaX doesn't support "if ! foo", so I replaced
 these with "if foo; then :; else ...; fi" constructs.

 Please find an attached third patch.
Blue Swirl - Jan. 28, 2010, 9:30 p.m.
On Thu, Jan 28, 2010 at 8:33 PM, Loïc Minier <lool@dooz.org> wrote:
> On Wed, Jan 27, 2010, Blue Swirl wrote:
>> That must've been it. But I get this on Milax:
>
>  I didn't know about MilaX; I had a hard time getting gcc/binutils (or
>  event git) to work along with working headers or base libs such as
>  zlib.h or unistd.h.  Do you have any instructions on how to get these
>  working?

The packaging system is weird. Maybe this list is useful.

application CSWbdb4            berkeleydb4 - Embedded database
libraries and utilities
application CSWbinutils        binutils - GNU binary utilities such as
gar, gas, gld, gnm and others
application CSWbonobo2         libbonobo2 - GNOME component and
compound document system
application CSWbzip2           bzip2 - The bzip2 high-quality data compressor
system      CSWcommon          common - common files and dirs for CSW packages
application CSWdbusglib        dbus_glib - DBus GLib Bindings
application CSWexpat           expat -  XML Parser Toolkit
system      CSWfam             fam - File Alteration Monitor, daemon
and interface library
application CSWfconfig         fontconfig - A library for configuring
and customizing font access.
application CSWftype2          freetype2 - The free and portable high
quality font engine
application CSWgcc3            gcc3 - GNU Compiler Suite branch 3 Replacement
application CSWgcc3core        gcc3core - GNU C Compiler
application CSWgcc3corert      gcc3corert - GNU C Compiler Run Time
application CSWgcc3g++         gcc3g++ - GNU C++ Compiler
application CSWgcc3g++rt       gcc3g++rt - GNU C++ Compiler Run Time
application CSWgcc3rt          gcc3rt - GNU Compiler Suite branch 3
Run Time Replacement
application CSWgcc4core        gcc4core - GNU C Compiler
application CSWgcc4corert      gcc4corert - GNU C Compiler Run Time
application CSWgconf2          gconf2 - GNOME configuration database system
system      CSWgcrypt          libgcrypt - GNU libcrypt
application CSWgdb             gdb - The GNU Debugger
system      CSWggettext        ggettext - GNU gettext
application CSWglib2           glib2 - the low-level core library for
GTK+ and GNOME
system      CSWgmake           gmake - GNU make
application CSWgnomevfs2       gnomevfs2 - GNOME Virtual File System
application CSWgnupg           gnupg - RFC 2440 compliant tool for
secure communication and data storage. (gpg binary)
system      CSWgnutls          gnutls - GNU Transport Layer Security
lib and tools
system      CSWgpgerr          libgpg_error - GNU gpg related library
application CSWgtk2            gtk2 - GTK+, The multiplatform X11
toolkit for GUI development
system      CSWiconv           libiconv - GNU iconv library
system      CSWisaexec         isaexec - sneaky wrapper around Sun isaexec
application CSWjasper          jasper - An image data software toolkit
for JPEG-2000 codec standard
system      CSWjpeg            jpeg - JPEG library and tools by the
Independent JPEG Group
application CSWkrb5lib         krb5_lib - MIT Kerberos 5 core libraries
application CSWlibart          libart - libart - High performance 2D
graphics library
application CSWlibatk          libatk - Accessibility toolkit for GNOME
application CSWlibcairo        libcairo - The Cairo 2D Graphics Library
application CSWlibcroco        libcroco - A CSS parsing and manipulation toolkit
application CSWlibcups         libcups - Libraries for the Common UNIX
Printing System
application CSWlibdbus         libdbus - DBus Message Bus System -
dynamic libraries
application CSWlibglade2       libglade2 - library for loading glade
user interface desc files
application CSWlibgnomecanvas  libgnomecanvas
application CSWlibgnomecups    libgnomecups - GNOME library for CUPS interaction
application CSWlibgnomeprint   libgnomeprint - The GNOME 2 print library
application CSWlibgnomeprintui libgnomeprintui - The GNOME 2 print UI library
application CSWlibgsf          libgsf - GNOME Structured File Library
application CSWlibidl          libidl - Library for handling CORBA IDL
system      CSWlibnet          libnet - the libnet packet construction library
application CSWlibpopt         libpopt - Popt is a C library for
parsing command line parameters
system      CSWlibsdl          libsdl - Simple DirectMedia Layer library
application CSWlibx11          libx11 - X11 client-side library
application CSWlibxau          libxau - X11 authorisation library
application CSWlibxcb          libxcb - The XCB library
application CSWlibxdmcp        libxdmcp - X11 authorisation library
application CSWlibxft2         libxft2 - FreeType-based font drawing
library for X
application CSWlibxml2         libxml2 - XML Parser Library
application CSWlibxrender      libxrender - X Render extension library
application CSWncurses         ncurses - ncurses library and utilities
application CSWnessuslib       nessuslib - libraries used by nessus
application CSWoldaprt         openldap_rt - OpenLDAP runtime
libraries (oldaprt)
system      CSWopencdk         opencdk - open crypto development kit
application CSWorbit2          orbit2 - ORBit 2.x CORBA tools and libs
application CSWossl            openssl - Openssl meta package
application CSWossldevel       openssl_devel - Openssl development support
application CSWosslrt          openssl_rt - Openssl runtime libraries
application CSWosslutils       openssl_utils - Openssl binaries and
related tools
application CSWpango           libpango - A framework for the layout
and rendering of i18n text
application CSWpixman          pixman - The pixel-manipulation library
for X and cairo
application CSWpkgutil         pkgutil - Installs Solaris packages easily
system      CSWpng             png - library for Portable Network
Graphics format (PNG)
application CSWqemu            qemu - x86 PC emulator
application CSWreadline        readline - GNU readline
application CSWsambalib        samba_lib - Tools to access a server's
filespace and printers via SMB (lib)
application CSWsasl            sasl - Simple Authentication and Security Layer
system      CSWsunmath         libsunmath - Sun maths library
system      CSWtextutils       textutils - GNU text file processing utilities
application CSWtiff            tiff - lib and tools for Tag Image File Format
application CSWzlib            zlib - Zlib Data Compression Library
system      SUNWarc            Lint Libraries (usr)
system      SUNWarcr           Lint Libraries (root)
system      SUNWhea            SunOS Header Files
system      SUNWlibm           Math & Microtasking Library Headers &
Lint Files (Usr)
system      SUNWlibmr          Math Library Lint Files (Root)
system      SUNWxwinc          X Window System include files

>
>> config-host.mak is out-of-date, running configure
>> /bin/ginstall: cannot stat `=': No such file or directory
>
>  Ok; this was a typo in the Solaris patch (note that I was reluctant to
>  touch the Solaris code in the first place); I could reproduce and also
>  noticed that /bin/sh on MilaX doesn't support "if ! foo", so I replaced
>  these with "if foo; then :; else ...; fi" constructs.
>
>  Please find an attached third patch.

Now the error is gone. Thanks, applied.

Patch

From 6fef73a3b890ec736cdfa1ff817230c8e6d760e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <lool@dooz.org>
Date: Wed, 20 Jan 2010 12:35:54 +0100
Subject: [PATCH 2/2] Solaris: test for presence of commands with has()

---
 configure |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 6bdd2b7..42ef628 100755
--- a/configure
+++ b/configure
@@ -803,21 +803,23 @@  fi
 # Solaris specific configure tool chain decisions
 #
 if test "$solaris" = "yes" ; then
-  solinst=`path_of $install`
-  if test -z "$solinst" ; then
+  if has $install; then
+    :
+  else
     echo "Solaris install program not found. Use --install=/usr/ucb/install or"
     echo "install fileutils from www.blastwave.org using pkg-get -i fileutils"
     echo "to get ginstall which is used by default (which lives in /opt/csw/bin)"
     exit 1
   fi
-  if test "$solinst" = "/usr/sbin/install" ; then
+  if test "`path_of $install`" = "/usr/sbin/install" ; then
     echo "Error: Solaris /usr/sbin/install is not an appropriate install program."
     echo "try ginstall from the GNU fileutils available from www.blastwave.org"
     echo "using pkg-get -i fileutils, or use --install=/usr/ucb/install"
     exit 1
   fi
-  sol_ar=`path_of ar`
-  if test -z "$sol_ar" ; then
+  if has ar; then
+    :
+  else
     echo "Error: No path includes ar"
     if test -f /usr/ccs/bin/ar ; then
       echo "Add /usr/ccs/bin to your path and rerun configure"
-- 
1.6.5