mandir = @mandir@
datadir = @datadir@
dictdir = @dictdir@
+mibdir = @mibdir@
logdir = @logdir@
includedir = @includedir@
endif
DICTIONARIES := $(wildcard $(addsuffix /dictionary*,$(addprefix share/dictionary/,$(PROTOCOLS))))
+MIBS = $(wildcard share/snmp/mibs/*.mib)
-install.share: $(addprefix $(R)$(dictdir)/,$(patsubst share/dictionary/%,%,$(DICTIONARIES)))
+install.share: \
+ $(addprefix $(R)$(dictdir)/,$(patsubst share/dictionary/%,%,$(DICTIONARIES))) \
+ $(addprefix $(R)$(mibdir)/,$(patsubst share/snmp/mibs/%,%,$(MIBS)))
$(R)$(dictdir)/%: share/dictionary/%
@echo INSTALL $(patsubst share/dictionary/%,%,$<)
@$(INSTALL) -m 644 $< $@
+$(R)$(mibdir)/%: share/snmp/mibs/%
+ @echo INSTALL $(patsubst share/snmp/mibs/%,%,$<)
+ @$(INSTALL) -m 644 $< $@
+
.PHONY: dictionary.format
dictionary.format: $(DICTIONARIES)
@./scripts/dict/format.pl $(DICTIONARIES)
SNMPWALK
SNMPGET
modconfdir
+mibdir
dictdir
raddbdir
radacctdir
with_radacctdir
with_raddbdir
with_dictdir
+with_mibdir
with_cap
with_cap_lib_dir
with_cap_include_dir
--with-radacctdir=DIR directory for detail files LOGDIR/radacct
--with-raddbdir=DIR directory for config files SYSCONFDIR/raddb
--with-dictdir=DIR directory for dictionary files DATAROOTDIR/freeradius
+ --with-mibdir=DIR directory for dictionary files DATAROOTDIR/snmp
--with-cap build with cap if available (default=yes)
--with-cap-lib-dir=DIR directory in which to look for cap library files
--with-cap-include-dir=DIR
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dictdir" >&5
printf "%s\n" "$dictdir" >&6; }
+mibdir='${datarootdir}/snmp/mibs'
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking mibdir" >&5
+printf %s "checking mibdir... " >&6; }
+
+# Check whether --with-mibdir was given.
+if test ${with_mibdir+y}
+then :
+ withval=$with_mibdir; case "$withval" in
+ no)
+ as_fn_error $? "Need mibdir" "$LINENO" 5
+ ;;
+ yes)
+ ;;
+ [\\/$]* | ?:[\\/]* )
+ mibdir="$withval"
+ ;;
+ *)
+ as_fn_error $? "expected an absolute directory name for --with-mibdir: $withval" "$LINENO" 5
+ ;;
+ esac
+
+fi
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $mibdir" >&5
+printf "%s\n" "$mibdir" >&6; }
+
modconfdir='${raddbdir}/mods-config'
AC_SUBST(dictdir)
AC_MSG_RESULT($dictdir)
+dnl #
+dnl # extra argument: --with-mibdir
+dnl #
+mibdir='${datarootdir}/snmp/mibs'
+AC_MSG_CHECKING(mibdir)
+AC_ARG_WITH(mibdir,
+[ --with-mibdir=DIR directory for dictionary files [DATAROOTDIR/snmp] ],
+[ case "$withval" in
+ no)
+ AC_MSG_ERROR([Need mibdir])
+ ;;
+ yes)
+ ;;
+ [[\\/$]]* | ?:[[\\/]]* )
+ mibdir="$withval"
+ ;;
+ *)
+ AC_MSG_ERROR([expected an absolute directory name for --with-mibdir: $withval])
+ ;;
+ esac ]
+)
+AC_SUBST(mibdir)
+AC_MSG_RESULT($mibdir)
+
modconfdir='${raddbdir}/mods-config'
AC_SUBST(modconfdir)