diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2017-11-04 17:29:24 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2017-11-11 22:38:13 -0800 |
commit | 6694c973c8c2b5fae5934a49578f69d2817ab49c (patch) | |
tree | 5a9d822d10653d5436d909159e4f8a45ee79e98b | |
parent | 39f07f7db58ebbf3dcb64a2bf9098ed5cf3d1223 (diff) |
Update check for manpage section numbers to not rely on Solaris version
Check for a specific file instead of a specific set of versions from
uname, to cope with manpage section alignment coming to 11.4 instead
of 12.0.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
-rw-r--r-- | xorg-macros.m4.in | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 7935426..efce888 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -114,6 +114,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) +case $host_os in + solaris*) + # Solaris 2.0 - 11.3 use SysV man page section numbers, so we + # check for a man page file found in later versions that use + # traditional section numbers instead + AC_CHECK_FILE([/usr/share/man/man7/attributes.7], + [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) + ;; + *) SYSV_MAN_SECTIONS=false ;; +esac + if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi @@ -129,9 +140,8 @@ if test x$LIB_MAN_DIR = x ; then fi if test x$FILE_MAN_SUFFIX = x ; then - case $host_os in - # Solaris 2.0 - 11 use SysV man page sections - solaris2.?|solaris2.1[[01]]) FILE_MAN_SUFFIX=4 ;; + case $SYSV_MAN_SECTIONS in + true) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi @@ -140,9 +150,8 @@ if test x$FILE_MAN_DIR = x ; then fi if test x$MISC_MAN_SUFFIX = x ; then - case $host_os in - # Solaris 2.0 - 11 use SysV man page sections - solaris2.?|solaris2.1[[01]]) MISC_MAN_SUFFIX=5 ;; + case $SYSV_MAN_SECTIONS in + true) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi @@ -151,9 +160,8 @@ if test x$MISC_MAN_DIR = x ; then fi if test x$DRIVER_MAN_SUFFIX = x ; then - case $host_os in - # Solaris 2.0 - 11 use SysV man page sections - solaris2.?|solaris2.1[[01]]) DRIVER_MAN_SUFFIX=7 ;; + case $SYSV_MAN_SECTIONS in + true) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi @@ -162,9 +170,8 @@ if test x$DRIVER_MAN_DIR = x ; then fi if test x$ADMIN_MAN_SUFFIX = x ; then - case $host_os in - # Solaris 2.0 - 11 use SysV man page sections - solaris2.?|solaris2.1[[01]]) ADMIN_MAN_SUFFIX=1m ;; + case $SYSV_MAN_SECTIONS in + true) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi |