Massive changes to get SNMP auto-configured && working.
authoraland <aland>
Mon, 12 Mar 2001 15:56:33 +0000 (15:56 +0000)
committeraland <aland>
Mon, 12 Mar 2001 15:56:33 +0000 (15:56 +0000)
Make.inc.in
acconfig.h
configure.in
src/include/autoconf.h.in
src/main/Makefile

index 69c6777..53776ec 100644 (file)
@@ -50,6 +50,9 @@ USE_SHARED_LIBS       = @USE_SHARED_LIBS@
 USE_STATIC_LIBS = @USE_STATIC_LIBS@
 STATIC_MODULES = @STATIC_MODULES@
 
+SNMP_INCLUDE   = @SNMP_INCLUDE@
+SNMP_LIBS      = @SNMP_LIBS@
+
 #
 #  SQL driver defines
 #
index 7a3cb08..df207aa 100644 (file)
@@ -86,20 +86,14 @@ config.h - created by autoconf; contains defines generated by autoconf
 /* 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
index 5442196..af57905 100644 (file)
@@ -391,20 +391,6 @@ dnl Check if we need -lnsl. Usually if we want to
 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
@@ -430,6 +416,8 @@ AC_CHECK_HEADERS( \
        syslog.h \
        inttypes.h \
        stdint.h \
+        stdio.h \
+        netdb.h \
        arpa/inet.h \
        netinet/in.h \
        sys/types.h \
@@ -437,18 +425,6 @@ AC_CHECK_HEADERS( \
        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)
 
@@ -599,6 +575,15 @@ else
   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
@@ -634,10 +619,6 @@ AC_SUBST(STATIC_MODULES)
 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 \
index 62e77d8..5b39ac3 100644 (file)
@@ -72,20 +72,14 @@ config.h - created by autoconf; contains defines generated by autoconf
 /* 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
@@ -183,6 +177,9 @@ config.h - created by autoconf; contains defines generated by autoconf
 /* 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
 
@@ -198,6 +195,9 @@ config.h - created by autoconf; contains defines generated by autoconf
 /* 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
 
@@ -237,9 +237,6 @@ config.h - created by autoconf; contains defines generated by autoconf
 /* 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
 
index bdfbfed..4d62e2c 100644 (file)
@@ -8,11 +8,11 @@ SERVER_OBJS   = radiusd.o files.o util.o acct.o nas.o log.o valuepair.o \
                  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)
 
 #