autoconf

So, I'm modifying an autoconf script for some software I'm working on... I'm trying to test that ${host} has "freebsd" in it. I've tried all sorts of variants of the following

Code:
if test "${host}" = "*freebsd*"; then
fi

if test "${host}" =~ ".*freebsd.*"; then
fi

but none seem to work... Either the test returns false (unexpectedly), or I just get errors when I run the ./configure script. I'm pretty green to scripting on a 'nix box, so any suggestions are obviously more than welcome.

Thanks in advance.
 
You could use a shell statement to do the same work without an extra process being forked:

Code:
case "${host}" in
  *freebsd*)
    do magic here
    ;;
esac
 
gordon@ said:
You could use a shell statement to do the same work without an extra process being forked:

Code:
case "${host}" in
  *freebsd*)
    do magic here
    ;;
esac

Yeah, I tried something similar.. However, there's already a similar test in place for OSX. There's a bunch of stuff that's run as default commands that I want to hit as well, but (unless I'm off), there's no way to nicely fall through to those (I'd read somewhere that terminating the case with ;& would fall through to the next command set, but autoconf apparently laughed at me when I tried it.
 
Back
Top