forked from lix-project/lix
* Slightly better heuristic for picking the canonical system type.
Now SuSE and Red Hat should yield the same type (`i686-linux'). Mac OS X should now give `powerpc-darwin' (i.e., the version number is gone).
This commit is contained in:
parent
064a36cb54
commit
39eaecbc98
12
configure.ac
12
configure.ac
|
@ -22,12 +22,14 @@ AC_CANONICAL_HOST
|
||||||
|
|
||||||
# Construct a Nix system name (like "i686-linux").
|
# Construct a Nix system name (like "i686-linux").
|
||||||
AC_MSG_CHECKING([for the canonical Nix system name])
|
AC_MSG_CHECKING([for the canonical Nix system name])
|
||||||
#machine_name=`uname -m`
|
machine_name=$(uname -p | tr 'A-Z ' 'a-z_')
|
||||||
#sys_name=`uname -s | tr [A-Z] [a-z]`
|
if test "$machine_name" = "unknown"; then
|
||||||
#system="${machine_name}-${sys_name}"
|
machine_name=$(uname -m | tr 'A-Z ' 'a-z_')
|
||||||
|
fi
|
||||||
|
sys_name=$(uname -s | tr 'A-Z ' 'a-z_')
|
||||||
AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
|
AC_ARG_WITH(system, AC_HELP_STRING([--with-system=SYSTEM],
|
||||||
[platform identifier (e.g., `i686-linux')]),
|
[platform identifier (e.g., `i686-linux')]),
|
||||||
system=$withval, system="$host_cpu-$host_os")
|
system=$withval, system="${machine_name}-${sys_name}")
|
||||||
AC_MSG_RESULT($system)
|
AC_MSG_RESULT($system)
|
||||||
AC_SUBST(system)
|
AC_SUBST(system)
|
||||||
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
|
AC_DEFINE_UNQUOTED(SYSTEM, ["$system"], [platform identifier (`cpu-os')])
|
||||||
|
@ -56,7 +58,7 @@ AC_DEFUN([NEED_PROG],
|
||||||
[
|
[
|
||||||
AC_PATH_PROG($1, $2)
|
AC_PATH_PROG($1, $2)
|
||||||
if test -z "$$1"; then
|
if test -z "$$1"; then
|
||||||
AC_MSG_ERROR([$1 is required])
|
AC_MSG_ERROR([$2 is required])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue