Index: ../trunk-jpl/m4/issm_options.m4 =================================================================== --- ../trunk-jpl/m4/issm_options.m4 (revision 24875) +++ ../trunk-jpl/m4/issm_options.m4 (revision 24876) @@ -189,8 +189,19 @@ [VENDOR=${withval}], dnl action if given [VENDOR=""] dnl action if not given ) - dnl defaults for host OS related variables - IS_MAC=no + + AC_MSG_CHECKING([if this is a Mac build]) + case "${host_os}" in + *darwin*) + IS_MAC=yes + ;; + *) + IS_MAC=no + ;; + esac + AM_CONDITIONAL([MAC], [test "${IS_MAC}" == "yes"]) + AC_MSG_RESULT([${IS_MAC}]) + IS_WINDOWS=no AC_MSG_CHECKING([for vendor compilers]) if test -n "${VENDOR}"; then @@ -285,16 +296,6 @@ AC_SUBST([OSLIBS]) AC_MSG_RESULT([done]) - AC_MSG_CHECKING([if this is a Mac build]) - dnl TODO: The following test is a POSIX-compliant way of testing for a - dnl substring, but is not very readable. Perhaps there is a more - dnl readable method of achieving the same? - if test "${host_os#*\"darwin\"}" == "$host_os"; then - IS_MAC=yes - fi - AM_CONDITIONAL([MAC], [test "${IS_MAC}" == "yes"]) - AC_MSG_RESULT([${IS_MAC}]) - AC_MSG_CHECKING([if this is a Windows build]) AM_CONDITIONAL([WINDOWS], [test "x${IS_WINDOWS}" == "xyes"]) AC_MSG_RESULT([${IS_WINDOWS}])