Code

Attempt at detecting 64bit compilation flags between gcc, old, and new versions of...
[nagiosplug.git] / plugins-root / Makefile.am
index a36e120a94f2585dc0a3df2c0777055bf1eaf05c..b5f55197024cd0403962bbc0aaa5f2d29c737c41 100644 (file)
@@ -1,13 +1,24 @@
 ## Process this file with automake to produce Makefile.in
 
-VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t 
+if RELEASE_PRESENT
+NP_VERSION = @NP_RELEASE@
+else
+NP-VERSION-FILE: .FORCE-NP-VERSION-FILE
+       @$(SHELL_PATH) $(top_srcdir)/NP-VERSION-GEN
+.FORCE-NP-VERSION-FILE:
+-include NP-VERSION-FILE
+endif
 
-INCLUDES = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@
+AM_CFLAGS = -DNP_VERSION='"$(NP_VERSION)"'
+
+VPATH = $(top_srcdir) $(top_srcdir)/lib $(top_srcdir)/plugins $(top_srcdir)/plugins/t $(srcdir)
+
+AM_CPPFLAGS = -I.. -I$(top_srcdir)/lib -I$(top_srcdir)/gl -I$(top_srcdir)/intl -I$(top_srcdir)/plugins @SSLINCLUDE@
 
-datadir = @datadir@
 localedir = $(datadir)/locale
 DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
-LIBS = @LIBINTL@ @LIBS@ @SSLLIBS@
+# Don't add LTLIBINTL to all, as pst3 doesn't need it
+#LIBS = @LTLIBINTL@ @LIBS@
 
 noinst_PROGRAMS = check_dhcp check_icmp @EXTRAS_ROOT@
 
@@ -26,7 +37,7 @@ TESTS = @PLUGIN_TEST@
 test:
        perl -I $(top_builddir) -I $(top_srcdir) ../test.pl
 
-setuid_root_mode = a=rx,u+s
+setuid_root_mode = ug=rx,u+s
 
 # /* Author Coreutils team - see ACKNOWLEDGEMENTS */
 
@@ -66,9 +77,18 @@ install-exec-local: $(noinst_PROGRAMS)
 
 ##############################################################################
 # the actual targets
-check_dhcp_LDADD = $(NETLIBS)
-check_icmp_LDADD = $(NETLIBS) $(SOCKETLIBS)
-pst3_LDADD = -lkvm
+check_dhcp_LDADD = @LTLIBINTL@ $(NETLIBS)
+check_icmp_LDADD = @LTLIBINTL@ $(NETLIBS) $(SOCKETLIBS)
+
+# -m64 needed at compiler and linker phase
+pst3_CFLAGS = @PST3CFLAGS@
+pst3_LDFLAGS = @PST3CFLAGS@
+# pst3 must not use nagiosplug/gnulib includes!
+pst3_CPPFLAGS =
 
 check_dhcp_DEPENDENCIES = check_dhcp.c $(NETOBJS) $(DEPLIBS) 
 check_icmp_DEPENDENCIES = check_icmp.c $(NETOBJS)
+
+clean-local:
+       rm -f NP-VERSION-FILE
+