Bug #611: configure script produces incorrect results under IRIX

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #611: configure script produces incorrect results under IRIX
Дата
Msg-id 20020311070820.1ADB0475951@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #611: configure script produces incorrect results under IRIX
Список pgsql-bugs
Jonathan C. Patschke (jp@celestrion.net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
configure script produces incorrect results under IRIX

Long Description
Under IRIX (and, presumably, other commercial UNIX platforms), the configure script in the root of the source
distributioncauses a number of tests to fail, where they should pass.  Some of these tests (detecting the presence of
vsnprintf()and snprintf() in the system headers, for example) must pass for the resulting code to compile with MIPSpro
C.

The root cause of this problem is that the script interpreter for the configure script is /bin/sh.  The configure
scriptis NOT a /bin/sh compatible script.  It requires GNU BASH to execute properly.  This may, in all actuality, be an
autoconfbug or an IRIX /bin/sh bug, but it hindered my using PostgreSQL.
 

WORKAROUND:  Edit the configure script to run under /usr/freeware/bin/bash, rather than /bin/sh.  Or call the script as
"bashconfigure [options]"
 

SUGGESTED SOLUTION:  Since not everyone installs bash in the same location. the configure script should test its
interpreterand throw an error if not running inside BASH. 

Sample Code
Inserting the following code into the configure script will produce the effect I recommended above.  I placed the code
justbefore the line reading "# Defaults:", and it worked well for me; however, putting it -after- the help generation
codeexits might be more fruitful.  I'm not an autoconf guru, so I wouldn't know where to put the code in configure.in.
 

## Begin sample code
if [ "" = "$BASH_VERSION" ] ; then
   echo '*** ERROR: Not running in BASH ***'
   echo ''
   echo "The PostgreSQL configure script requires the GNU BASH"
   echo "command interpreter.  If you do not have a copy of BASH,"
   echo "you may obtain one at the following URL:"
   echo ''
   echo "   http://www.gnu.org/software/bash/bash.html"
   echo ''
   echo "If BASH is already installed on your system, please execute"
   echo "the configure script in the following manner:"
   echo ''
   echo '   bash configure [options]'
   echo ''
   exit 1;
fi
## End sample code


No file was uploaded with this report

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: comparing null value in plpgsql.
Следующее
От: Bhuvan A
Дата:
Сообщение: Re: comparing null value in plpgsql.