Commit 17e7b401 authored by Adam Mercer's avatar Adam Mercer
Browse files

move osx version check into specific macro

add the LALSUITE_OSX_VERSION_CHECK macro that contains the check for a
supported OSX version, reduces code repetition.
Original: 2c60bb75358b4c0aacdb560c55a477fe796e91f4
parent eb61666d
# lalsuite_build.m4 - top level build macros
#
# serial 11
# serial 12
AC_DEFUN([LALSUITE_USE_LIBTOOL],
[## $0: Generate a libtool script for use in configure tests
......@@ -314,3 +314,29 @@ AC_DEFUN([LALSUITE_ENABLE_OSX_VERSION_CHECK],
esac
], [ osx_version_check=true ] )
])
AC_DEFUN([LALSUITE_OSX_VERSION_CHECK],
[
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
])
......@@ -185,28 +185,7 @@ AC_CHECK_PROGS([MKIND],[makeindex],[echo])
AC_CHECK_PROGS([DVIPS],[dvips],[echo])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -170,28 +170,7 @@ AM_PATH_PYTHON([2.4],,[:])
AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != :])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -83,28 +83,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -84,28 +84,7 @@ AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
AC_CHECK_PROGS([M4],[gm4 m4],[m4])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -86,28 +86,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -82,28 +82,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -89,28 +89,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -83,28 +83,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
......@@ -83,28 +83,7 @@ LT_INIT
AM_PATH_PYTHON([2.4],,[AC_MSG_ERROR([Python-2.4, or higher, is required])])
# check for supported mac os x version
LALSUITE_ENABLE_OSX_VERSION_CHECK
if test "x${osx_version_check}" = "xtrue"; then
if test "x$build_vendor" = "xapple"; then
AC_CHECK_PROGS([SW_VERS],[sw_vers])
if test "x$SW_VERS" != "x"; then
AC_MSG_CHECKING([Mac OS X version])
MACOSX_VERSION=`$SW_VERS -productVersion`
AC_MSG_RESULT([$MACOSX_VERSION])
fi
case "$MACOSX_VERSION" in
10.0*|10.1*|10.2*|10.3*)
AC_MSG_ERROR([This version of Mac OS X is not supported])
;;
10.4*|10.5*|10.6*)
# supported version
;;
*)
AC_MSG_WARN([Unknown Mac OS X version])
;;
esac
fi
fi
LALSUITE_OSX_VERSION_CHECK
# link tests using libtool
LALSUITE_USE_LIBTOOL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment