summaryrefslogtreecommitdiff
path: root/source4/build/m4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-07-28 11:51:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:09 -0500
commit930e624d816a175d5ca4448e6ed40bc7dd8ec5b7 (patch)
treecefd60a954d828902c8fde6a6e8a69954e0baa63 /source4/build/m4
parentd0496a4ee626f829f1b5032122d2daf53e0bd2e2 (diff)
downloadsamba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.gz
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.tar.bz2
samba-930e624d816a175d5ca4448e6ed40bc7dd8ec5b7.zip
r8826: Make configure generate config.mk files (with the external libraries
that were found) and a config.pm file (with all substitution variables) (This used to be commit 52bb1374bbcfc9b9a6d098687bafe9021a1ee858)
Diffstat (limited to 'source4/build/m4')
-rw-r--r--source4/build/m4/check_path.m416
-rw-r--r--source4/build/m4/check_perl.m42
-rw-r--r--source4/build/m4/core.m468
-rw-r--r--source4/build/m4/env.m42
-rw-r--r--source4/build/m4/public.m4179
5 files changed, 43 insertions, 224 deletions
diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4
index a6e9ab258d..55f04dee9a 100644
--- a/source4/build/m4/check_path.m4
+++ b/source4/build/m4/check_path.m4
@@ -14,16 +14,16 @@ AC_PREFIX_DEFAULT(/usr/local/samba)
AC_ARG_WITH(fhs,
[ --with-fhs Use FHS-compliant paths (default=no)],
configdir="${sysconfdir}/samba"
- lockdir="\${VARDIR}/cache/samba"
- piddir="\${VARDIR}/run/samba"
- logfilebase="\${VARDIR}/log/samba"
+ lockdir="\${localstatedir}/cache/samba"
+ piddir="\${localstatedir}/run/samba"
+ logfilebase="\${localstatedir}/log/samba"
privatedir="\${CONFIGDIR}/private"
libdir="\${prefix}/lib/samba"
swatdir="\${DATADIR}/samba/swat",
- configdir="\${LIBDIR}"
- logfilebase="\${VARDIR}"
- lockdir="\${VARDIR}/locks"
- piddir="\${VARDIR}/locks"
+ configdir="\${libdir}"
+ logfilebase="\${localstatedir}"
+ lockdir="\${localstatedir}/locks"
+ piddir="\${localstatedir}/locks"
privatedir="\${prefix}/private"
swatdir="\${prefix}/swat")
@@ -152,8 +152,6 @@ AC_ARG_ENABLE(developer, [ --enable-developer Turn on developer warnings a
CFLAGS="${CFLAGS} -g -Wall"
developer=yes
DEVELOPER_CFLAGS="-Wshadow -Werror-implicit-function-declaration -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wdeclaration-after-statement -Wmissing-format-attribute -Wformat=2 -Wno-format-y2k -DDEBUG_PASSWORD -DDEVELOPER"
- SMB_INFO_BUILD_ENV="$SMB_INFO_BUILD_ENV
- \$SETTINGS{DEVELOPER} = \"YES\";"
fi])
debug=no
diff --git a/source4/build/m4/check_perl.m4 b/source4/build/m4/check_perl.m4
index 5e493db875..34a7e5e769 100644
--- a/source4/build/m4/check_perl.m4
+++ b/source4/build/m4/check_perl.m4
@@ -8,7 +8,7 @@ dnl
AC_PATH_PROG(PERL, perl)
if test x"$PERL" = x""; then
AC_MSG_WARN([No version of perl was not found!])
- AC_MSG_ERROR([Please Install perl from http://www.perl.com/])
+ AC_MSG_ERROR([Please install perl from http://www.perl.com/])
fi
if test x"$debug" = x"yes";then
PERL="$PERL -W"
diff --git a/source4/build/m4/core.m4 b/source4/build/m4/core.m4
deleted file mode 100644
index 6471fc9e64..0000000000
--- a/source4/build/m4/core.m4
+++ /dev/null
@@ -1,68 +0,0 @@
-dnl SMB Build Core System
-dnl -------------------------------------------------------
-dnl Copyright (C) Stefan (metze) Metzmacher 2004
-dnl Copyright (C) Jelmer Vernooij 2004
-dnl Released under the GNU GPL
-dnl -------------------------------------------------------
-dnl
-dnl _SMB_BUILD_CORE(
-dnl 1: outputfile
-dnl )
-
-dnl #######################################################
-dnl ### And now the implementation ###
-dnl #######################################################
-
-dnl _SMB_BUILD_CORE(
-dnl 1: outputfile
-dnl )
-AC_DEFUN([_SMB_BUILD_CORE],
-[
-
-$PERL -I$srcdir/build <<\_SMB_ACEOF
-use strict;
-
-my %SETTINGS;
-my %INPUT;
-
-use smb_build::main;
-
-###########################################################
-### First we list all info from configure ###
-###########################################################
-#
-#########################################
-## Start Build Env
-$SMB_INFO_BUILD_ENV
-## End Build Env
-#########################################
-#########################################
-## Start Ext Libs
-$SMB_INFO_EXT_LIBS
-## End Ext Libs
-#########################################
-#########################################
-## Start Modules
-$SMB_INFO_MODULES
-## End Modules
-#########################################
-## Start Subsystems
-$SMB_INFO_SUBSYSTEMS
-## End Subsystems
-#########################################
-## Start Libraries
-$SMB_INFO_LIBRARIES
-## End Libraries
-#########################################
-## Start Binaries
-$SMB_INFO_BINARIES
-## End Binaries
-#########################################
-
-$SMB_INFO_ENABLES
-
-smb_build_main(\%INPUT, \%SETTINGS);
-
-_SMB_ACEOF
-
-])
diff --git a/source4/build/m4/env.m4 b/source4/build/m4/env.m4
index 7d43f920dd..7ab6dc61b0 100644
--- a/source4/build/m4/env.m4
+++ b/source4/build/m4/env.m4
@@ -13,8 +13,6 @@ if test -n "${SAMBA_VERSION_SVN_REVISION}";then
echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}"
fi
-SMB_INFO_BUILD_ENV=""
-
sinclude(build/m4/check_path.m4)
sinclude(build/m4/check_perl.m4)
sinclude(build/m4/check_cc.m4)
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 2a6b4e3893..c70514bdb6 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -1,104 +1,46 @@
dnl SMB Build System
dnl ----------------
dnl Copyright (C) 2004 Stefan Metzmacher
-dnl Copyright (C) 2004 Jelmer Vernooij
+dnl Copyright (C) 2004-2005 Jelmer Vernooij
dnl Published under the GPL
dnl
-dnl SMB_MODULE_DEFAULT(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_MODULE_DEFAULT(name,default_build)
dnl
-dnl SMB_SUBSYSTEM_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_SUBSYSTEM_ENABLE(name,default_build)
dnl
-dnl SMB_SUBSYSTEM(
-dnl 1:name,
-dnl 2:init_obj_files,
-dnl 3:add_obj_files,
-dnl 4:required_libraries,
-dnl 5:required_subsystems
-dnl )
+dnl SMB_SUBSYSTEM(name,init_obj_files,add_obj_files,required_subsystems)
dnl
-dnl SMB_EXT_LIB_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_EXT_LIB_ENABLE(name,default_build)
dnl
-dnl SMB_EXT_LIB_FROM_PKGCONFIG(
-dnl 1:name,
-dnl 2:pkg-config name
-dnl )
+dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name)
dnl
-dnl SMB_EXT_LIB(
-dnl 1:name,
-dnl 2:libs,
-dnl 3:cflags,
-dnl 4:cppflags,
-dnl 5:ldflags
-dnl )
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
dnl
-dnl SMB_LIBRARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_LIBRARY_ENABLE(name,default_build)
dnl
-dnl SMB_BINARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_BINARY_ENABLE(name,default_build)
dnl
-dnl SMB_MAKE_TARGET(
-dnl 1:name
-dnl 2:calledname
-dnl )
-dnl
-dnl SMB_ENV_CHECK(
-dnl 1:dummy
-dnl )
-dnl
-dnl SMB_AC_OUTPUT(
-dnl 1: outputfile
-dnl )
-
dnl #######################################################
dnl ### And now the implementation ###
dnl #######################################################
-AC_DEFUN([STR2ARRAY], [@<:@ input::str2array(\"$1\") @:>@])
-
-
-dnl SMB_MODULE_DEFAULT(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_MODULE_DEFAULT(name,default_build)
AC_DEFUN([SMB_MODULE_DEFAULT],
[
[SMB_MODULE_DEFAULT][$1]="$2"
-SMB_INFO_MODULES="$SMB_INFO_MODULES
-\$INPUT{$1}{DEFAULT_BUILD} = \"$2\";"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_SUBSYSTEM_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_SUBSYSTEM_ENABLE(name,default_build)
AC_DEFUN([SMB_SUBSYSTEM_ENABLE],
[
[SMB_SUBSYSTEM_ENABLE_][$1]="$2"
-SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
-\$INPUT{$1}{ENABLE} = \"$2\";"
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_SUBSYSTEM(
-dnl 1:name,
-dnl 2:init_obj_files,
-dnl 3:add_obj_files,
-dnl 4:required_libs,
-dnl 5:required_subsystems
-dnl )
+dnl SMB_SUBSYSTEM(name,init_obj_files,add_obj_files,required_subsystems)
AC_DEFUN([SMB_SUBSYSTEM],
[
@@ -113,35 +55,25 @@ AC_DEFUN([SMB_SUBSYSTEM],
SMB_INFO_SUBSYSTEMS="$SMB_INFO_SUBSYSTEMS
###################################
# Start Subsystem $1
-\$INPUT{$1} = {
- TYPE => \"SUBSYSTEM\",
- NAME => \"$1\",
- INIT_OBJ_FILES => ][STR2ARRAY([$2])][,
- ADD_OBJ_FILES => ][STR2ARRAY([$3])][,
- REQUIRED_LIBRARIES => ][STR2ARRAY([$4])][,
- REQUIRED_SUBSYSTEMS => ][STR2ARRAY([$5])][,
- ENABLE => \"YES\"
-};
+@<:@SUBSYSTEM::$1@:>@
+INIT_OBJ_FILES = $2
+ADD_OBJ_FILES = $3
+REQUIRED_SUBSYSTEMS = $4
+ENABLE = YES
# End Subsystem $1
###################################
"
])
-dnl SMB_EXT_LIB_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_EXT_LIB_ENABLE(name,default_build)
AC_DEFUN([SMB_EXT_LIB_ENABLE],
[
[SMB_EXT_LIB_ENABLE_][$1]="$2"
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$INPUT{EXT_LIB_$1}{ENABLE} = \"$2\";"
+\$enabled{EXT_LIB_$1} = \"$2\";"
])
-dnl SMB_EXT_LIB_FROM_PKGCONFIG(
-dnl 1:name,
-dnl 2:pkg-config name
-dnl )
+dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name)
AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
[
dnl Figure out the correct variables and call SMB_EXT_LIB()
@@ -201,76 +133,35 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
fi
])
-dnl SMB_EXT_LIB(
-dnl 1:name,
-dnl 2:libs,
-dnl 3:cflags,
-dnl 4:cppflags,
-dnl 5:ldflags
-dnl )
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
AC_DEFUN([SMB_EXT_LIB],
[
SMB_INFO_EXT_LIBS="$SMB_INFO_EXT_LIBS
###################################
# Start Ext Lib $1
-\$INPUT{EXT_LIB_$1} = {
- TYPE => \"EXT_LIB\",
- NAME => \"EXT_LIB_$1\",
- LIBS => ][STR2ARRAY([$2])][,
- CFLAGS => ][STR2ARRAY([$3])][,
- CPPFLAGS => ][STR2ARRAY([$4])][,
- LDFLAGS => ][STR2ARRAY([$5])][
-};
+@<:@EXT_LIB::EXT_LIB_$1@:>@
+LIBS = $2
+CFLAGS = $3
+CPPFLAGS = $4
+LDFLAGS = $5
# End Ext Lib $1
###################################
"
])
-
-dnl SMB_LIBRARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_LIBRARY_ENABLE(name,default_build)
AC_DEFUN([SMB_LIBRARY_ENABLE],
[
SMB_INFO_ENABLES="$SMB_INFO_ENABLES
-\$INPUT{$1}{ENABLE} = \"$2\";"
+\$enabled{$1} = \"$2\";"
])
-dnl SMB_BINARY_ENABLE(
-dnl 1:name,
-dnl 2:default_build
-dnl )
+dnl SMB_BINARY_ENABLE(name,default_build)
AC_DEFUN([SMB_BINARY_ENABLE],
[
[SMB_BINARY_ENABLE_][$1]="$2";
-SMB_INFO_BINARIES="$SMB_INFO_BINARIES
-\$INPUT{$1}{ENABLE} = \"$2\";"
-])
-
-dnl SMB_MAKE_TARGET(
-dnl 1:name
-dnl 2:calledname
-dnl )
-AC_DEFUN([SMB_MAKE_TARGET],
-[
- echo "#SMB_MAKE_TARGET TOTO"
-])
-
-dnl SMB_ENV_CHECK(
-dnl 1:dummy
-dnl )
-AC_DEFUN([SMB_ENV_CHECK],
-[
- _SMB_BUILD_ENV($1)
-])
-
-dnl SMB_AC_OUTPUT(
-dnl 1: outputfile
-dnl )
-AC_DEFUN([SMB_AC_OUTPUT],
-[
- AC_OUTPUT([$1],[],[_SMB_BUILD_CORE([[$1][.in]])])
+SMB_INFO_ENABLES="$SMB_INFO_ENABLES
+\$enabled{$1} = \"$2\";"
])