Skip to contentSkip to conversation

autoconf: Use $(DEFS) when building idmapwb.so and pam_cifscreds.so

PATCH In review Sachin Prabhu 2 participants 2 messages Jan 8, 2016 – Jan 21, 2016 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 autoconf: Use $(DEFS) when building idmapwb.so and pam_cifscreds.so

We should pass the macros defined in $(DEFS) when building idmapwb.so and pam_cifscreds.so. The autoconf process sets the macro HAVE_CONFIG_H using the $(DEFS) variable. This macro has to be defined to allow the source files to include config.h

---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile.am +2 -2
index 92da8b1..2e99e60 100644
@@ -84,7 +84,7 @@ plugin_PROGRAMS = idmapwb.so
 man_MANS += idmapwb.8
 
 idmapwb.so: idmapwb.c
-	$(CC) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
+	$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
 
 idmapwb.8: idmapwb.8.in
 	$(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/[email protected] > $@-t && mv $@-t $@
@@ -95,7 +95,7 @@ if CONFIG_PAM
 pam_PROGRAMS = pam_cifscreds.so
 
 pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
-	$(CC) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
+	$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
 man_MANS += pam_cifscreds.8
 endif
 
Signature · 1 line
2.5.0
#2 lore raw
In reply to a message not in the archive
Quoted 24 lines · On Fri, 8 Jan 2016 17:54:39 +0530 Sachin Prabhu…

We should pass the macros defined in $(DEFS) when building idmapwb.so and pam_cifscreds.so. The autoconf process sets the macro HAVE_CONFIG_H using the $(DEFS) variable. This macro has to be defined to allow the source files to include config.h

---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile.am +1 -1
index 92da8b1..2e99e60 100644
@@ -84,7 +84,7 @@ plugin_PROGRAMS = idmapwb.so
 man_MANS += idmapwb.8
 
 idmapwb.so: idmapwb.c
-	$(CC) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
+	$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(WBCLIENT_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ $(WBCLIENT_LIBS)
 
 idmapwb.8: idmapwb.8.in
 	$(SED) 's,[@]pluginpath@,$(pluginpath),' $(srcdir)/[email protected] > $@-t && mv $@-t $@

Makefile.am if CONFIG_PAM · line 101

Quoted 8 lines
Makefile.am +1 -1
@@ -95,7 +95,7 @@ if CONFIG_PAM
 pam_PROGRAMS = pam_cifscreds.so
 
 pam_cifscreds.so: pam_cifscreds.c cifskey.c resolve_host.c util.c
-	$(CC) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
+	$(CC) $(DEFS) $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -shared -fpic -o $@ $+ -lpam -lkeyutils
 man_MANS += pam_cifscreds.8
 endif
 

Merged.

Thanks,

Signature · 1 line
Jeff Layton <[email protected]>