summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-01-09 03:57:42 -0800
committerGuy Harris <gharris@sonic.net>2023-01-09 03:57:42 -0800
commited6d4f3054929da4c21cb15cc545d9c7f9a96e10 (patch)
tree6e1ab395050fdf477df6ddbdb2d9cfce87e80d30 /CMakeLists.txt
parent737308bc0f6ed1f68a78caad857ed21782e0dcca (diff)
downloadtcpdump-ed6d4f3054929da4c21cb15cc545d9c7f9a96e10.tar.gz
CMake: set man page section numbers.
We use both MAN_FILE_FORMATS and MAN_MISC_INFO in tcpdump.1; set them Also set _SUN on AIX, as we do with the configure script.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f52d086e..90c8e268 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1243,6 +1243,55 @@ file(GLOB PROJECT_SOURCE_LIST_H
*.h
)
+#
+# Assume, by default, no support for shared libraries and V7/BSD
+# convention for man pages (devices in section 4, file formats in
+# section 5, miscellaneous info in section 7, administrative commands
+# and daemons in section 8). Individual cases can override this.
+# Individual cases can override this.
+#
+set(MAN_FILE_FORMATS 5)
+set(MAN_MISC_INFO 7)
+if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
+ # Workaround to enable certain features
+ set(_SUN TRUE)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
+ #
+ # Use System V conventions for man pages.
+ #
+ set(MAN_FILE_FORMATS 4)
+ set(MAN_MISC_INFO 5)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "IRIX" OR CMAKE_SYSTEM_NAME STREQUAL "IRIX64")
+ #
+ # Use IRIX conventions for man pages; they're the same as the
+ # System V conventions, except that they use section 8 for
+ # administrative commands and daemons.
+ #
+ set(MAN_FILE_FORMATS 4)
+ set(MAN_MISC_INFO 5)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "OSF1")
+ #
+ # DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX.
+ # Use Tru64 UNIX conventions for man pages; they're the same as the
+ # System V conventions except that they use section 8 for
+ # administrative commands and daemons.
+ #
+ set(MAN_FILE_FORMATS 4)
+ set(MAN_MISC_INFO 5)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*")
+ #
+ # SunOS 5.x.
+ #
+ if(CMAKE_SYSTEM_VERSION STREQUAL "5.12")
+ else()
+ #
+ # Use System V conventions for man pages.
+ #
+ set(MAN_FILE_FORMATS 4)
+ set(MAN_MISC_INFO 5)
+ endif()
+endif()
+
source_group("Source Files" FILES ${PROJECT_SOURCE_LIST_C})
source_group("Header Files" FILES ${PROJECT_SOURCE_LIST_H})