After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309802 - configure script not bourne shell compatible
configure script not bourne shell compatible
Status: RESOLVED OBSOLETE
Product: doxygen
Classification: Other
Component: build
1.4.x
Other Solaris
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 310026 (view as bug list)
Depends on: 320815
Blocks:
 
 
Reported: 2005-07-08 13:39 UTC by Paul Floyd
Modified: 2015-06-28 20:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Paul Floyd 2005-07-08 13:39:52 UTC
Version details: 1.4.3 tarball
Distribution/Version: 8

Run configure on a system where /bin/sh is a real bourne shell.
Line 529 reads

if test -e "src/lang_cfg.h"; then

but test -e is only valid for the korn shell and bash

Workaround: change 1st line to "#!/bin/bash"
Comment 1 Dimitri van Heesch 2005-07-09 09:47:45 UTC
I would like to get this working with a real bourne shell, but I haven't found
one to test against. I did find ash (a minimal bourne compatible shell) and the
configure script did work with that. So please help me to fix the script. I do
not want to use #!/bin/bash as the script also works with ksh and ash.
Comment 2 Paul Floyd 2005-07-09 12:16:14 UTC
This was on Solaris. I'd also expect HP-UX, AIX and the lesser commercial unices
to have real bourne shells.
Comment 3 Dimitri van Heesch 2005-07-09 12:31:56 UTC
I have an ultra-sparc 10 with Solaris 9 which I use to compile the sparc binary
of doxygen, but haven't run into any shell issues so far.
Comment 4 Paul Floyd 2005-07-09 19:32:45 UTC
This is a bit odd. I did the test on a Solaris 8 SPARC machine at work.

At home now (Solaris 10 x86) and test -e seems to work OK, even though the man
page claims

     -e file                 True if file exists. (Not  available
                             in sh.)
Comment 5 Dimitri van Heesch 2005-07-11 18:53:11 UTC
*** Bug 310026 has been marked as a duplicate of this bug. ***
Comment 6 Raimo Niskanen 2005-08-30 10:51:41 UTC
I would suggest using "test -f" to test for existence of a regular file. That
works in plain Bourne shell.

Furthermore the "-n" switch is not recognized by "echo", in fact it recognizes
no switches at all in Bourne shell. The safest would be to remove the "-n"
switches and print the search result on the next line.

The standard ./configure utility of course does this the right(tm) way. It
checks if "echo" either recognizes the "-n" switch, or the special
line continuation "\c" character, or not in which case they print the
result with a preceeding tab on the next line:

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi

# Usage:
echo $ac_n "Checking for something... $ac_c"
# Checking()
echo "$ac_t""Found!"
Comment 7 André Klapper 2006-08-13 19:57:06 UTC
at least reopening as requested information has been provided.
Comment 8 Kevin McBride 2015-06-28 20:04:12 UTC
With CMake being used in 1.8.11-GIT, and CMake being the better standard for
compatibility when compiling, I am closing this bug.