diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-10-23 02:49:17 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-10-23 02:49:17 +0000 |
commit | 759b17f0f6a60508f4bdddc16997d78eaa3d7755 (patch) | |
tree | 3ecd7159e7f44bc74f6ed4306e70eda7e0b109c0 /src | |
parent | aeb277c405a34f1fd29180a72ea5a842854ca3d3 (diff) |
Fix for version guessing in configure.
Diffstat (limited to 'src')
-rw-r--r-- | src/configure.in | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/configure.in b/src/configure.in index 43fc773fd80..39d130de105 100644 --- a/src/configure.in +++ b/src/configure.in @@ -72,17 +72,26 @@ fi dnl this part selects the template from the one in the dnl template directory. +dnl LOOK FOR EXACT MATCH FIRST, +dnl then try an OS without a version + AC_MSG_CHECKING(setting template to) AC_ARG_WITH(template, [ --with-template=TEMPLATE use operating system template file see template directory], [ TEMPLATE=$withval ], - [ host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` - GUESS=`grep "$host_no_ver" template/.similar | sed 's/.*=//' | tail -1` + [ + GUESS=`grep "^$host=" template/.similar | sed 's/.*=//' | tail -1` if test "$GUESS" - then TEMPLATE="$GUESS" - else TEMPLATE=`uname -s | tr A-Z a-z` + then TEMPLATE="$GUESS" + else + host_no_ver=`echo "$host" | sed 's/[[0-9.]]*$//'` + GUESS=`grep "^$host_no_ver" template/.similar | sed 's/.*=//' | tail -1` + if test "$GUESS" + then TEMPLATE="$GUESS" + else TEMPLATE=`uname -s | tr A-Z a-z` + fi fi ]) AC_MSG_RESULT($TEMPLATE) |