diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/m4/public.m4 | 40 | ||||
-rw-r--r-- | source4/configure.ac | 28 |
2 files changed, 42 insertions, 26 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 +]) diff --git a/source4/configure.ac b/source4/configure.ac index d07632a291..8671c1a352 100644 --- a/source4/configure.ac +++ b/source4/configure.ac @@ -160,25 +160,7 @@ fi CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/lib/replace -I\$(srcdir)/lib/talloc -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS" -echo "configure: creating build/smb_build/config.pm" -cat >build/smb_build/config.pm<<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 +SMB_WRITE_PERLVARS(build/smb_build/config.pm) echo "configure: creating config.mk" cat >config.mk<<CEOF @@ -222,13 +204,7 @@ if test $CMP_RET != 0; then cp include/config_tmp.h include/config.h fi -echo "configure: creating mkconfig.mk" -cat >mkconfig.mk<<CEOF -# mkconfig.mk - Autogenerated by configure, DO NOT EDIT! -AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [ -AC_Var = $AC_Var]) -$MAKE_SETTINGS -CEOF +SMB_WRITE_MAKEVARS(mkconfig.mk) if test $USESHARED = true then |