]> arthur.barton.de Git - bup.git/commitdiff
configure.inc: strip trailing characters from 'uname -s' output
authorAneurin Price <aneurin.price@gmail.com>
Wed, 1 Jun 2011 16:20:36 +0000 (17:20 +0100)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 9 Jun 2011 02:57:58 +0000 (22:57 -0400)
On Cygwin, 'uname -s' includes the version of the underlying operating
system; here it is 'CYGWIN_NT-6.0'. The configure script attempts to
define this in config/config.h, but '#define OS_CYGWIN_NT-6.0 1' is an
invalid macro definition.

This truncates the value to just 'CYGWIN', to match $OS in the Makefile.

Signed-off-by: Aneurin Price <aneurin.price@gmail.com>
config/configure.inc

index a698422d06b00cf17a6290aa4372860a044ef0cc..0ecdc674903d37aa717041a09d63cca50aafcf13 100644 (file)
@@ -651,7 +651,7 @@ EOF
     AC_PROG_CPP
     AC_PROG_INSTALL
 
-    ac_os=`uname -s`
+    ac_os=`uname -s | sed 's/[-_].*//'`
     _os=`echo $ac_os | tr '[a-z]' '[A-Z]'`
     AC_DEFINE OS_$_os  1
     eval OS_${_os}=1