2010-05-18 20:40:49 +02:00
|
|
|
Index: net-snmp-5.5/net-snmp-config.in
|
2007-01-16 00:26:37 +01:00
|
|
|
===================================================================
|
2010-05-18 20:40:49 +02:00
|
|
|
--- net-snmp-5.5.orig/net-snmp-config.in
|
|
|
|
+++ net-snmp-5.5/net-snmp-config.in
|
2010-01-21 11:28:30 +01:00
|
|
|
@@ -41,6 +41,14 @@ count()
|
|
|
|
echo $#
|
2007-01-16 00:26:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
+check_devel_files()
|
|
|
|
+{
|
|
|
|
+ if [ ! -e "${NSC_INCDIR}/net-snmp/net-snmp-config.h" ] ; then
|
|
|
|
+ echo "Can not find \"${NSC_INCDIR}/net-snmp/net-snmp-config.h\". The net-snmp development files seems to be missing. Exiting" >&2
|
|
|
|
+ # exit 2
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
prefix=@prefix@
|
|
|
|
exec_prefix=@exec_prefix@
|
|
|
|
includedir=@includedir@
|
2010-01-21 11:28:30 +01:00
|
|
|
@@ -120,9 +128,11 @@ else
|
2007-01-16 00:26:37 +01:00
|
|
|
;;
|
|
|
|
#################################################### compile
|
|
|
|
--base-cflags)
|
|
|
|
+ check_devel_files
|
|
|
|
echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
|
|
|
|
;;
|
|
|
|
--cflags|--cf*)
|
|
|
|
+ check_devel_files
|
|
|
|
echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
|
|
|
|
;;
|
|
|
|
--srcdir)
|
2010-01-21 11:28:30 +01:00
|
|
|
@@ -133,6 +143,7 @@ else
|
2007-01-16 00:26:37 +01:00
|
|
|
echo $NSC_LIBDIR
|
|
|
|
;;
|
|
|
|
--ldflags|--ld*)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_LDFLAGS
|
|
|
|
;;
|
|
|
|
--build-lib-dirs)
|
2010-01-21 11:28:30 +01:00
|
|
|
@@ -166,30 +177,38 @@ else
|
2007-01-16 00:26:37 +01:00
|
|
|
;;
|
|
|
|
#################################################### client lib
|
|
|
|
--libs)
|
|
|
|
+ check_devel_files
|
|
|
|
# use this one == --netsnmp-libs + --external-libs
|
|
|
|
echo $NSC_LDFLAGS $NSC_LIBDIR -lnetsnmp $NSC_LIBS
|
|
|
|
;;
|
|
|
|
--netsnmp-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_LIBDIR -lnetsnmp
|
|
|
|
;;
|
|
|
|
--external-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_LDFLAGS $NSC_LIBS
|
|
|
|
;;
|
|
|
|
#################################################### agent lib
|
|
|
|
--base-agent-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_BASE_AGENT_LIBS
|
|
|
|
;;
|
|
|
|
--base-subagent-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_BASE_SUBAGENT_LIBS
|
|
|
|
;;
|
|
|
|
--agent-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
# use this one == --netsnmp-agent-libs + --external-libs
|
|
|
|
echo $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS
|
|
|
|
;;
|
|
|
|
--netsnmp-agent-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_LIBDIR $NSC_BASE_AGENT_LIBS
|
|
|
|
;;
|
|
|
|
--external-agent-libs)
|
|
|
|
+ check_devel_files
|
|
|
|
echo $NSC_LDFLAGS $NSC_AGENTLIBS
|
|
|
|
;;
|
|
|
|
####################################################
|
2010-01-21 11:28:30 +01:00
|
|
|
@@ -215,6 +234,7 @@ else
|
2007-01-16 00:26:37 +01:00
|
|
|
|
|
|
|
####################################################
|
|
|
|
--compile-subagent)
|
|
|
|
+ check_devel_files
|
|
|
|
shift
|
2008-10-24 22:48:33 +02:00
|
|
|
shifted=1
|
2007-01-16 00:26:37 +01:00
|
|
|
while test "x$done" = "x" -a "x$1" != "x" ; do
|