autoconf
[Top][All Lists]
Advanced

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

Testing platform


From: Dr. David Kirkby
Subject: Testing platform
Date: Thu, 15 Oct 2009 22:53:01 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20090218)

I've got this bit of code, which checks for 'bash'. The user does not need to use the bash shell, but many scripts assume the back shell and will fail otherwise (no, I did not write them myself!)

Feel free to tell me how to criticise/improve this if you can.

AC_CHECK_PROG(foobar,bash,[yes],[no],[])
if test x$foobar  != xyes
then
AC_MSG_WARN([Sorry, the 'bash' shell is needed to build AC_PACKAGE_NAME]) AC_MSG_WARN([All modern systems will have the 'bash' shell installed somewhere]) AC_MSG_WARN([On HP-UX you may try adding /opt/OpenSource/bin/ to your path])
    AC_MSG_WARN([On AIX you may try adding /opt/pware/bin to your path])
    AC_MSG_ERROR([Exiting, as 'bash' was not found])
fi


As you can see, it offers suggestions of locations where 'bash' may be found. Clearly, if the person is running on AIX, there is not much point in telling them where to find bash on HP-UX.

Realistically, any attempt to cross-compile this program will fail. (In fact, it would require a *major* effort to port it to AIX or HP-UX, but I thought I'd add the locations of the bash binary on a couple of systems I have access to).

Dave




reply via email to

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