[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

config.status and /bin/sh on Solaris

From: Dimitrios Apostolou
Subject: config.status and /bin/sh on Solaris
Date: Fri, 27 Jan 2017 19:36:56 +0100 (CET)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

Hello list,

on my Solaris 10, for some unknown reason, /sometimes/ config.status is generated with "#! /bin/sh" shebang, instead of bash. When this happens, the configure script prints ugly messages but *succeeds*, but then gmake fails miserably because of malformed Makefile. Here are the message config.status prints, when it runs under /bin/sh:

$ ./config.status
./config.status: print: not found
./config.status: print: not found
./config.status: print: not found
[ ... lots of the same messages ... ]
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

I am setting CONFIG_SHELL=/usr/xpg4/bin/sh to work-around this. However I am trying to fix this at the same time, since Solaris /bin/sh should work, as it's a bourne shell.

I'm trying to fix the generated code in config.status to work with the printf statement from /bin/sh (instead if inexistent print). I can see that first print is tried, then printf, then echo. Besides the generated files, where is the relevant source file in autoconf source? Relevant snippet:

    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='print -r --'
  as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
  as_echo='printf %s\n'
  as_echo_n='printf %s'
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then


reply via email to

[Prev in Thread] Current Thread [Next in Thread]