GNOME Bugzilla – Bug 309802
configure script not bourne shell compatible
Last modified: 2015-06-28 20:04:12 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"
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.
This was on Solaris. I'd also expect HP-UX, AIX and the lesser commercial unices to have real bourne shells.
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.
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.)
*** Bug 310026 has been marked as a duplicate of this bug. ***
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!"
at least reopening as requested information has been provided.
With CMake being used in 1.8.11-GIT, and CMake being the better standard for compatibility when compiling, I am closing this bug.