Handling multiple conditions in if statements

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

 



Hi

In one of my macros I need to do one thing on linux platforms and
another on others, in the macro I have the followings:

  if test "x$build_os" = "xlinux"; then
    # case for linux
  else
    # other platforms
  fi

I recently received a bug report that this wasn't working as the users
system had $build_os defined as 'linux-gnu', whereas on others it was
just 'linux'. I then tried to change the if statement to:

  if test "x$build_os" = "xlinux" -o test "x$build_os" = "xlinux-gnu"; then

but that didn't work, in fact any of the usual ways I would do an OR
in shell script didn't work.

How can I have an if statement with multiple conditions? Or is there a
better way to accomplish this?

Cheers

Adam

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux