File: 62_add_lib_cflags.patch

package info (click to toggle)
net-snmp 5.9.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 38,720 kB
  • sloc: ansic: 282,878; perl: 17,704; sh: 12,151; makefile: 2,711; python: 734; xml: 663; pascal: 62; sql: 47
file content (46 lines) | stat: -rw-r--r-- 1,760 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Description: Add base-lib-cflags option
 Add option "--base-lib-cflags" to net-snmp-config. This flag returns
 options needed to link against libnetsnmp. In particular, no perl
 specific options are provided.
 .
 It was reported in "libsnmp-base: forcing perl headers in net-snmp-config
 --cflags breaks perl builds"
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502806
Author: Net-SNMP Packaging Team <pkg-net-snmp-devel@lists.alioth.debian.org>
Reviewed-by: Craig Small <csmall@debian.org>
Last-Update: 2019-02-07
--- a/net-snmp-config.in
+++ b/net-snmp-config.in
@@ -145,6 +145,9 @@
     --base-cflags)
       echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
       ;;
+    --base-lib-cflags)
+      echo @LIBCFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
+      ;;
     --cflags|--cf*)
       echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
       ;;
@@ -707,6 +710,8 @@
   echo "  These options produce the various compilation flags needed when"
   echo "  building external SNMP applications:"
   echo ""
+  echo "    --base-lib-cflags lists additional compilation flags needed for linking"
+  echo "                      against libsnmp"
   echo "    --base-cflags     lists additional compilation flags needed"
   echo "    --cflags          lists additional compilation flags needed"
   echo "                      (includes -I. and extra developer warning flags)"
--- a/configure.ac
+++ b/configure.ac
@@ -74,6 +74,11 @@
 m4_include([configure.d/config_os_misc1])
 m4_include([configure.d/config_os_libs2])
 AC_CACHE_SAVE
+
+# Save CFLAGS for net-snmp-config
+LIBCFLAGS=$CFLAGS
+AC_SUBST(LIBCFLAGS)
+
 m4_include([configure.d/config_project_perl_python])
 m4_include([configure.d/config_os_misc2])
 m4_include([configure.d/config_project_types])