diff --git a/INSTALL b/INSTALL index 665e306fd7..3d802a72d3 100644 --- a/INSTALL +++ b/INSTALL @@ -499,6 +499,13 @@ I Other configure options xsltproc. By default, the user's path is searched for those programs in that order, and the first one found is used. + --with-ctf-tools[=DIR] + Location of ctfconvert and ctfmerge. Defaults to detect. These + tools create a reduced form of debug information that describes + types and function prototypes. This option is only relevant to + platforms that provide CTF tools and, at the moment, it is only + functional on Solaris (onbld package must be installed). + There are also some environment variables that you can set to control aspects of the build. They can be set either on the configure command line (preferred) or in the environment. diff --git a/acinclude.m4 b/acinclude.m4 index 91006174f5..7b35bb122e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -79,4 +79,5 @@ OPENAFS_C_STRUCT_LABEL_CHECK OPENAFS_DIRENT_CHECKS OPENAFS_SYS_RESOURCE_CHECKS OPENAFS_UUID_CHECKS +OPENAFS_CTF_TOOLS_CHECKS ]) diff --git a/src/cf/ctf-tools.m4 b/src/cf/ctf-tools.m4 new file mode 100644 index 0000000000..3880a88b88 --- /dev/null +++ b/src/cf/ctf-tools.m4 @@ -0,0 +1,30 @@ +AC_DEFUN([OPENAFS_CTF_TOOLS_CHECKS],[ + +CTF_DEFAULT_PATH="$PATH:/usr/bin:/opt/onbld/bin/$HOST_CPU" + +AC_ARG_WITH([ctf-tools], + AS_HELP_STRING([--with-ctf-tools@<:@=DIR@:>@], + [Location of the CTF tools]), + [CTF_TOOLS="$withval"], + [CTF_TOOLS="check"]) + +AS_CASE([$CTF_TOOLS], + [check], [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_DEFAULT_PATH]) + AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_DEFAULT_PATH])], + + [yes], [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_DEFAULT_PATH]) + AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_DEFAULT_PATH]) + AS_IF([test "x$CTFCONVERT" = "x"], [AC_ERROR("ctfconvert not found")]) + AS_IF([test "x$CTFMERGE" = "x"], [AC_ERROR("ctfmerge not found")])], + + [no], [], + + [AC_PATH_PROG([CTFCONVERT], [ctfconvert], [], [$CTF_TOOLS]) + AC_PATH_PROG([CTFMERGE], [ctfmerge], [], [$CTF_TOOLS]) + AS_IF([test "x$CTFCONVERT" = "x"], [AC_ERROR("ctfconvert not found")]) + AS_IF([test "x$CTFMERGE" = "x"], [AC_ERROR("ctfmerge not found")])] +) + +AC_ARG_VAR([CTFCONVERT], [Path to ctfconvert]) +AC_ARG_VAR([CTFMERGE], [Path to ctfmerge]) +]) diff --git a/src/cf/summary.m4 b/src/cf/summary.m4 index 0ac9fc0287..1b969326ba 100644 --- a/src/cf/summary.m4 +++ b/src/cf/summary.m4 @@ -51,6 +51,9 @@ AC_DEFUN([OPENAFS_SUMMARY],[ AS_IF([test "${summary_doxygen}" = "yes" -a "${HAVE_DOT}" = "yes"], [summary_doxygen_graphs="yes"], [summary_doxygen_graphs="no"]) + AS_IF([test "x$CTFCONVERT" != "x" -a "x$CTFMERGE" != "x"], + [summary_ctf_tools="yes"], + [summary_ctf_tools="no"]) cat <