USE_STATIC_LIBS = @USE_STATIC_LIBS@
STATIC_MODULES = @STATIC_MODULES@
+SNMP_INCLUDE = @SNMP_INCLUDE@
+SNMP_LIBS = @SNMP_LIBS@
+
#
# SQL driver defines
#
/* Define if you have the <snmp.h> header file. */
#undef HAVE_SNMP_H
-/* Define if you have the <ucd_snmp/snmp.h> header file. */
-#undef HAVE_UCD_SNMP_SNMP_H
-
/* Define if you have the <snmp_impl.h> header file. */
#undef HAVE_SNMP_IMPL_H
-/* Define if you have the <ucd_snmp/snmp_impl.h> header file. */
-#undef HAVE_UCD_SNMP_SNMP_IMPL_H
-
/* Define if you have the <asn1.h> header file. */
#undef HAVE_ASN1_H
-/* Define if you have the <ucd_snmp/asn1.h> header file. */
-#undef HAVE_UCD_SNMP_ASN1_H
+/* Define if you have the snmp library (-lsnmp). */
+#undef HAVE_LIBSNMP
/* define if you have the <libpq_fe.h> header file. */
#undef HAVE_LIBPQ_FE_H
dnl link against -lsocket we need to include -lnsl as well.
AC_CHECK_LIB(nsl, inet_ntoa)
-dnl #
-dnl # Look for the SNMP libraries.
-dnl # If we can't link to them, try adding -lcrypto to LIBS,
-dnl # and try linking again.
-dnl #
-if test "x$WITH_SNMP" = "xyes"; then
- AC_CHECK_LIB(snmp, snmp_build_var_op)
-fi
-
-POSTGRESQL_CHECKS
-MYSQL_CHECKS
-ORACLE_CHECKS
-ODBC_CHECKS
-
dnl #############################################################
dnl #
dnl # 3. Checks for header files
syslog.h \
inttypes.h \
stdint.h \
+ stdio.h \
+ netdb.h \
arpa/inet.h \
netinet/in.h \
sys/types.h \
sys/time.h
)
-dnl #
-dnl # If we have SNMP libraries, check for SNMP header files.
-dnl #
-if test "x$WITH_SNMP" = "xyes"; then
- AC_CHECK_HEADER(snmp.h, AC_DEFINE(HAVE_SNMP_H),
- AC_CHECK_HEADER(ucd-snmp/snmp.h, AC_DEFINE(HAVE_UCD_SNMP_SNMP_H)))
- AC_CHECK_HEADER(snmp_impl.h, AC_DEFINE(HAVE_SNMP_IMPL_H),
- AC_CHECK_HEADER(ucd-snmp/snmp_impl.h, AC_DEFINE(HAVE_UCD_SNMP_SNMP_IMPL_H)))
- AC_CHECK_HEADER(asn1.h, AC_DEFINE(HAVE_ASN1_H),
- AC_CHECK_HEADER(ucd-snmp/asn1.h, AC_DEFINE(HAVE_UCD_SNMP_ASN1_H)))
-fi
-
REGEX=no
AC_CHECK_HEADER(regex.h, REGEX=yes)
AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT))
fi
+if test "x$WITH_SNMP" = "xyes"; then
+ SNMP_CHECKS
+fi
+
+POSTGRESQL_CHECKS
+MYSQL_CHECKS
+ORACLE_CHECKS
+ODBC_CHECKS
+
dnl #############################################################
dnl #
dnl # 8. Checks for system services
AC_SUBST(REGEX)
AC_SUBST(REGEX_EXTENDED)
-if test "x$WITH_SNMP" = "xyes"; then
- AC_DEFINE(WITH_SNMP)
-fi
-
AC_OUTPUT(\
./Make.inc \
./src/include/build-radpaths-h \
/* Define if you have the <snmp.h> header file. */
#undef HAVE_SNMP_H
-/* Define if you have the <ucd_snmp/snmp.h> header file. */
-#undef HAVE_UCD_SNMP_SNMP_H
-
/* Define if you have the <snmp_impl.h> header file. */
#undef HAVE_SNMP_IMPL_H
-/* Define if you have the <ucd_snmp/snmp_impl.h> header file. */
-#undef HAVE_UCD_SNMP_SNMP_IMPL_H
-
/* Define if you have the <asn1.h> header file. */
#undef HAVE_ASN1_H
-/* Define if you have the <ucd_snmp/asn1.h> header file. */
-#undef HAVE_UCD_SNMP_ASN1_H
+/* Define if you have the snmp library (-lsnmp). */
+#undef HAVE_LIBSNMP
/* define if you have the <libpq_fe.h> header file. */
#undef HAVE_LIBPQ_FE_H
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
+/* Define if you have the <netdb.h> header file. */
+#undef HAVE_NETDB_H
+
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define if you have the <sys/dir.h> header file. */
#undef HAVE_SYS_DIR_H
/* Define if you have the resolv library (-lresolv). */
#undef HAVE_LIBRESOLV
-/* Define if you have the snmp library (-lsnmp). */
-#undef HAVE_LIBSNMP
-
/* Define if you have the socket library (-lsocket). */
#undef HAVE_LIBSOCKET
version.o proxy.o exec.o auth.o timestr.o conffile.o \
modules.o modcall.o session.o xlat.o threads.o smux.o \
radius_snmp.o client.o request_list.o
-INCLUDES = ../include/radiusd.h ../include/conf.h ../include/autoconf.h
+INCLUDES = ../include/radiusd.h ../include/conf.h ../include/autoconf.h
-CFLAGS += -I../include
+CFLAGS += -I../include $(SNMP_INCLUDE)
LDFLAGS += -L../lib
-LIBS += -lradius
+LIBS += -lradius $(SNMP_LIBS)
MODULE_LIBS = $(STATIC_MODULES)
#