summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-18 17:48:50 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-18 17:48:50 +0200
commit9207a22a0e624b60f148fe7ac261b130ba6c285d (patch)
tree868361b9efd04d4e504588da5a2ba87854cf75b9 /source4/build/m4
parent4911af47f8cd750f9b0f1374b447f171318de964 (diff)
downloadsamba-9207a22a0e624b60f148fe7ac261b130ba6c285d.tar.gz
samba-9207a22a0e624b60f148fe7ac261b130ba6c285d.tar.bz2
samba-9207a22a0e624b60f148fe7ac261b130ba6c285d.zip
Move writing autoconf vars into files into m4 macros.
(This used to be commit 3ce8a4bb5568bb798c40034e3fa6a613ad2bf43b)
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/public.m440
1 files changed, 40 insertions, 0 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index ba8251e65d..7a9a76d60f 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -12,6 +12,10 @@ dnl SMB_ENABLE(name,default_build)
dnl
dnl SMB_INCLUDE_MK(file)
dnl
+dnl SMB_WRITE_MAKEVARS(file)
+dnl
+dnl SMB_WRITE_PERLVARS(file)
+dnl
dnl #######################################################
dnl ### And now the implementation ###
dnl #######################################################
@@ -150,3 +154,39 @@ $1_ENABLE = $2
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
\$enabled{$1} = \"$2\";"
])
+
+dnl SMB_WRITE_MAKEVARS(path)
+AC_DEFUN([SMB_WRITE_MAKEVARS],
+[
+echo "configure: creating $1"
+cat >$1<<CEOF
+# $1 - Autogenerated by configure, DO NOT EDIT!
+AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
+AC_Var = $AC_Var])
+$MAKE_SETTINGS
+CEOF
+])
+
+dnl SMB_WRITE_PERLVARS(path)
+AC_DEFUN([SMB_WRITE_PERLVARS],
+[
+echo "configure: creating $1"
+cat >$1<<CEOF
+# config.pm - Autogenerate by configure. DO NOT EDIT!
+
+package config;
+require Exporter;
+@ISA = qw(Exporter);
+@EXPORT_OK = qw(%enabled %config);
+use strict;
+
+use vars qw(%enabled %config);
+
+%config = (AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
+ AC_Var => '$AC_Var',])
+);
+
+$SMB_INFO_ENABLES
+1;
+CEOF
+])