1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-29 16:21:20 +03:00

Fix for version guessing in configure.

This commit is contained in:
Bruce Momjian 1998-10-23 02:49:17 +00:00
parent aeb277c405
commit 759b17f0f6

View File

@ -72,17 +72,26 @@ fi
dnl this part selects the template from the one in the dnl this part selects the template from the one in the
dnl template directory. dnl template directory.
dnl LOOK FOR EXACT MATCH FIRST,
dnl then try an OS without a version
AC_MSG_CHECKING(setting template to) AC_MSG_CHECKING(setting template to)
AC_ARG_WITH(template, AC_ARG_WITH(template,
[ --with-template=TEMPLATE [ --with-template=TEMPLATE
use operating system template file use operating system template file
see template directory], see template directory],
[ TEMPLATE=$withval ], [ 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" if test "$GUESS"
then TEMPLATE="$GUESS" then TEMPLATE="$GUESS"
else TEMPLATE=`uname -s | tr A-Z a-z` 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 fi
]) ])
AC_MSG_RESULT($TEMPLATE) AC_MSG_RESULT($TEMPLATE)