Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 759b17f

Browse files
committed
Fix for version guessing in configure.
1 parent aeb277c commit 759b17f

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/configure.in

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,26 @@ fi
7272
dnl this part selects the template from the one in the
7373
dnl template directory.
7474

75+
dnl LOOK FOR EXACT MATCH FIRST,
76+
dnl then try an OS without a version
77+
7578
AC_MSG_CHECKING(setting template to)
7679
AC_ARG_WITH(template,
7780
[ --with-template=TEMPLATE
7881
use operating system template file
7982
see template directory],
8083
[ TEMPLATE=$withval ],
81-
[ host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'`
82-
GUESS=`grep "$host_no_ver" template/.similar | sed 's/.*=//' | tail -1`
84+
[
85+
GUESS=`grep "^$host=" template/.similar | sed 's/.*=//' | tail -1`
8386
if test "$GUESS"
84-
then TEMPLATE="$GUESS"
85-
else TEMPLATE=`uname -s | tr A-Z a-z`
87+
then TEMPLATE="$GUESS"
88+
else
89+
host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'`
90+
GUESS=`grep "^$host_no_ver" template/.similar | sed 's/.*=//' | tail -1`
91+
if test "$GUESS"
92+
then TEMPLATE="$GUESS"
93+
else TEMPLATE=`uname -s | tr A-Z a-z`
94+
fi
8695
fi
8796
])
8897
AC_MSG_RESULT($TEMPLATE)

0 commit comments

Comments
 (0)