Blame configure.d/config_project_manual

Packit fcad23
# -*- autoconf -*-
Packit fcad23
#
Packit fcad23
# Prompt for various bits of user information
Packit fcad23
#
Packit fcad23
Packit fcad23
if test "x$ac_cv_user_prompt_NETSNMP_LOGFILE" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_LOC" = "x" -o "x$ac_cv_user_prompt_NETSNMP_SYS_CONTACT" = "x" -o "x$ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION" = "x"; then
Packit fcad23
AC_CACHE_CHECK(whether to prompt for values, ac_cv_have_warned,
Packit fcad23
[
Packit fcad23
if test "x$defaults" = "xno"; then
Packit fcad23
AC_MSG_NOTICE([
Packit fcad23
Packit fcad23
	 ************** Configuration Section **************
Packit fcad23
Packit fcad23
	You are about to be prompted with a series of questions.  Answer
Packit fcad23
them carefully, as they determine how the SNMP agent and related
Packit fcad23
applications are to function.
Packit fcad23
Packit fcad23
	After the configure script finishes, you can browse the newly
Packit fcad23
created net-snmp-config.h file for further - less important - parameters to
Packit fcad23
modify.  Be careful if you re-run configure though, since net-snmp-config.h 
Packit fcad23
will be overwritten.
Packit fcad23
Packit fcad23
-Press return to continue-
Packit fcad23
])
Packit fcad23
Packit fcad23
read tmpinput <&AS_ORIGINAL_STDIN_FD
Packit fcad23
ac_cv_have_warned="yes"
Packit fcad23
else
Packit fcad23
  ac_cv_have_warned="no"
Packit fcad23
fi
Packit fcad23
])
Packit fcad23
else
Packit fcad23
  ac_cv_have_warned="yes"
Packit fcad23
fi
Packit fcad23
Packit fcad23
ME=`$WHOAMI`
Packit fcad23
if test -f /etc/resolv.conf; then
Packit fcad23
  LOC=`awk '/^domain/{loc=$NF}END{print loc}' /etc/resolv.conf`
Packit fcad23
fi
Packit fcad23
if test "x$LOC" = x; then
Packit fcad23
  LOC="@no.where"
Packit fcad23
fi
Packit fcad23
Packit fcad23
AC_PROMPT_USER(NETSNMP_DEFAULT_SNMP_VERSION,[
Packit fcad23
Packit fcad23
*** Default SNMP Version:
Packit fcad23
Packit fcad23
	Starting with Net-SNMP 5.0, you can choose the default version of
Packit fcad23
the SNMP protocol to use when no version is given explicitly on the
Packit fcad23
command line, or via an 'snmp.conf' file.  In the past this was set to
Packit fcad23
SNMPv1, but you can use this to switch to SNMPv3 if desired.  SNMPv3
Packit fcad23
will provide a more secure management environment (and thus you're
Packit fcad23
encouraged to switch to SNMPv3), but may break existing scripts that
Packit fcad23
rely on the old behaviour.  (Though such scripts will probably need to
Packit fcad23
be changed to use the '-c' community flag anyway, as the SNMPv1
Packit fcad23
command line usage has changed as well.).
Packit fcad23
   At this prompt you can select \"1\", \"2\" (for SNMPv2c), or \"3\" as
Packit fcad23
the default version for the command tools (snmpget, ...) to use.  This
Packit fcad23
can always be overridden at runtime using the -v flag to the tools, or
Packit fcad23
by using the \"defVersion\" token in your snmp.conf file.
Packit fcad23
   Providing the --with-default-snmp-version=\"x\" parameter to ./configure
Packit fcad23
will avoid this prompt.
Packit fcad23
Packit fcad23
Default version of SNMP to use],3,unquoted)
Packit fcad23
Packit fcad23
# we tested this above before the prompt, but the prompt may give a new value.
Packit fcad23
case "${ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION}" in
Packit fcad23
  [[123]]) ;;
Packit fcad23
  2c) ac_cv_user_prompt_NETSNMP_DEFAULT_SNMP_VERSION=2 ;;
Packit fcad23
  *)
Packit fcad23
    AC_MSG_ERROR([Illegal version number.  Only 1, 2 (for SNMPv2c) and 3 are supported.])
Packit fcad23
    ;;
Packit fcad23
esac
Packit fcad23
Packit fcad23
AC_PROMPT_USER(NETSNMP_SYS_CONTACT,[
Packit fcad23
Packit fcad23
*** System Contact Information:
Packit fcad23
Packit fcad23
	Describes who should be contacted about the host the agent is
Packit fcad23
running on.  This information is available in the MIB-II tree.  This
Packit fcad23
can also be over-ridden using the \"syscontact\" syntax in the agent's
Packit fcad23
configuration files.
Packit fcad23
  Providing the --with-sys-contact=\"contact\" parameter to ./configure
Packit fcad23
will avoid this prompt.
Packit fcad23
Packit fcad23
System Contact Information],$ME@$LOC,quoted)
Packit fcad23
Packit fcad23
AC_PROMPT_USER(NETSNMP_SYS_LOC,[
Packit fcad23
Packit fcad23
*** System Location:
Packit fcad23
Packit fcad23
	Describes the location of the system.  This information is
Packit fcad23
available in the MIB-II tree.  this can also be over-ridden using the
Packit fcad23
\"syslocation\" syntax in the agent's configuration files.
Packit fcad23
  Providing the --with-sys-location=\"location\" parameter to ./configure
Packit fcad23
will avoid this prompt.
Packit fcad23
Packit fcad23
System Location],Unknown,quoted)
Packit fcad23
Packit fcad23
if test -d /var/log; then
Packit fcad23
  defaultlog="/var/log/snmpd.log"
Packit fcad23
else
Packit fcad23
  defaultlog="/usr/adm/snmpd.log"
Packit fcad23
fi
Packit fcad23
  
Packit fcad23
AC_PROMPT_USER(NETSNMP_LOGFILE,[
Packit fcad23
Packit fcad23
*** Logfile location:
Packit fcad23
Packit fcad23
	Enter the default location for the snmpd agent to dump
Packit fcad23
information & errors to.  If not defined (enter the keyword \"none\"
Packit fcad23
at the prompt below) the agent will use stdout and stderr instead.
Packit fcad23
(Note: This value can be over-ridden using command line options.)
Packit fcad23
  Providing the --with-logfile=\"path\" parameter to ./configure
Packit fcad23
will avoid this prompt.
Packit fcad23
Packit fcad23
Location to write logfile],$defaultlog,quoted)
Packit fcad23
Packit fcad23
if test -d /var; then
Packit fcad23
  defaultstore="/var/net-snmp"
Packit fcad23
  ucddefaultstore="/var/ucd-snmp"
Packit fcad23
else
Packit fcad23
  defaultstore="/etc/net-snmp"
Packit fcad23
  ucddefaultstore="/etc/ucd-snmp"
Packit fcad23
fi
Packit fcad23
  
Packit fcad23
AC_PROMPT_USER(NETSNMP_PERSISTENT_DIRECTORY,[
Packit fcad23
Packit fcad23
*** snmpd persistent storage location:
Packit fcad23
Packit fcad23
	Enter a directory for the SNMP library to store persistent
Packit fcad23
data in the form of a configuration file.  This default location is
Packit fcad23
different than the old default location (which was for ucd-snmp).  If
Packit fcad23
you stay with the new path, I'll ask you in a second if you wish to
Packit fcad23
copy your files over to the new location (once only).  If you pick
Packit fcad23
some other path than the default, you'll have to copy them yourself.
Packit fcad23
There is nothing wrong with picking the old path ($ucddefaultstore) if
Packit fcad23
you'd rather.
Packit fcad23
  Providing the --with-persistent-directory=\"path\" parameter to
Packit fcad23
./configure will avoid this prompt.
Packit fcad23
Packit fcad23
Location to write persistent information],$defaultstore,quoted)
Packit fcad23
Packit fcad23
PERSISTENT_DIRECTORY=$ac_cv_user_prompt_NETSNMP_PERSISTENT_DIRECTORY
Packit fcad23
AC_SUBST(PERSISTENT_DIRECTORY)
Packit fcad23
UCDPERSISTENT_DIRECTORY=$ucddefaultstore
Packit fcad23
AC_SUBST(UCDPERSISTENT_DIRECTORY)
Packit fcad23
Packit fcad23
if test $PERSISTENT_DIRECTORY = "$defaultstore" -a -d "$ucddefaultstore" -a ! -d "$defaultstore" ; then
Packit fcad23
AC_CACHE_CHECK(If we should copy the old persistent directory, ac_cv_user_prompt_COPY_PERSISTENT_FILES,
Packit fcad23
[
Packit fcad23
AC_PROMPT_USER_NO_DEFINE(ac_cv_user_prompt_COPY_PERSISTENT_FILES,[
Packit fcad23
Packit fcad23
*** Copying old ucd-snmp persistent files to net-snmp persistent directory:
Packit fcad23
Packit fcad23
	Would you like to copy the older ucd-snmp persistent files
Packit fcad23
into your new net-snmp persistent file path?  This will functionally
Packit fcad23
save all your ucd-snmp data and let it be used within the net-snmp
Packit fcad23
tools.  This will only be done once when you run make install.  If you
Packit fcad23
wish to do this, enter "yes" at the prompt.
Packit fcad23
  Providing the --with-copy-persistent-files=\"no\" (or \"yes\")
Packit fcad23
parameters to ./configure will avoid this prompt.
Packit fcad23
Packit fcad23
Copy ucd-snmp data into the net-snmp data directory],"yes")
Packit fcad23
])
Packit fcad23
else
Packit fcad23
ac_cv_user_prompt_COPY_PERSISTENT_FILES="no"
Packit fcad23
fi
Packit fcad23
COPY_PERSISTENT_FILES="$ac_cv_user_prompt_COPY_PERSISTENT_FILES"
Packit fcad23
AC_SUBST(COPY_PERSISTENT_FILES)