]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix redefinition issues by undefining conflicting defines if were building a module
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 5 Nov 2012 20:38:25 +0000 (20:38 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 6 Nov 2012 12:13:40 +0000 (12:13 +0000)
configure.in
src/include/autoconf.h.in
src/include/automask.h [new file with mode: 0644]
src/modules/rules.mak

index 29532ee41ccf7e5cb7e3eac0a9ad740103d0f4f1..7f26156090d7cb8d24f8b4829d35a73720d2e64e 100644 (file)
@@ -1199,6 +1199,12 @@ dnl #  Configure in any module directories.
 dnl #
 dnl #############################################################
 
+dnl ############################################################
+dnl # Remove any conflicting definitions if autoconf.h
+dnl # is being included by a module.
+dnl #############################################################
+AH_BOTTOM([#include <freeradius-devel/automask.h>])
+
 mysubdirs=""
 if test "x$EXPERIMENTAL" = "xyes"; then
   bar=`ls -1 "${srcdir}"/src/modules/rlm_*/configure | sed 's%/configure%%'`
index e41ab8b278f0b50c0f0d5ecc2b165112bc9c9906..91b2b6944489b9bc431d7fc2b1522951319e6d2d 100644 (file)
 
 /* define to something if you don't have ut_xtime in struct utmpx */
 #undef ut_xtime
+
+#include <freeradius-devel/automask.h>
diff --git a/src/include/automask.h b/src/include/automask.h
new file mode 100644 (file)
index 0000000..baca51d
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *  C Preprocessor definitions we do *NOT* want to leave defined autoconf.h
+ *  Which are dependent on where the header is being used.
+ *
+ *  Version: $Id$
+ */
+
+
+/*
+ *  If were building a module we may have local PACKAGE_* defines if  
+ *  AC_INIT() was called with full arguments.  
+ */
+#ifdef IS_MODULE
+#      undef PACKAGE_BUGREPORT
+#      undef PACKAGE_NAME
+#      undef PACKAGE_STRING
+#      undef PACKAGE_TARNAME
+#      undef PACKAGE_URL
+#      undef PACKAGE_VERSION
+#endif
+
index a6c4b5e5393d9ade8c18cfa3154b0ea6b54aaa60..d8b98b2bd846c36a1b33d325a8daf0e382356d9b 100644 (file)
@@ -44,6 +44,8 @@ LT_OBJS               := $(patsubst %.c,%.lo,$(filter %.c,$(SRCS)))
 LT_OBJS                += $(patsubst %.cxx,%.lo,$(filter %.cxx,$(SRCS)))
 LT_OBJS                += $(patsubst %.cpp,%.lo,$(filter %.cpp,$(SRCS)))
 CFLAGS         += -I$(top_builddir)/src $(INCLTDL)
+CFLAGS         += -DIS_MODULE=1
+
 
 #######################################################################
 #