diff options
Diffstat (limited to 'source4/build/m4')
-rw-r--r-- | source4/build/m4/check_ld.m4 | 34 | ||||
-rw-r--r-- | source4/build/m4/public.m4 | 75 |
2 files changed, 78 insertions, 31 deletions
diff --git a/source4/build/m4/check_ld.m4 b/source4/build/m4/check_ld.m4 index 0d0742e5d2..3a74ffc239 100644 --- a/source4/build/m4/check_ld.m4 +++ b/source4/build/m4/check_ld.m4 @@ -151,36 +151,12 @@ if test $BLDSHARED = true; then ac_cv_shmod_works=yes rm -f shlib.${SHLIBEXT} shlib.o ]) - if test $ac_cv_shlib_works = no -o $ac_cv_shmod_works = no; then - BLDSHARED=false + if test $ac_cv_shlib_works = no; then + AC_MSG_ERROR(unable to build shared libraries) + fi + if test $ac_cv_shmod_works = no; then + AC_MSG_ERROR(unable to build shared modules) fi -fi - -if test $BLDSHARED != true; then - SHLD="shared-libraries-disabled" - SHLD_FLAGS="shared-libraries-disabled" - MDLD="shared-modules-disabled" - MDLD_FLAGS="shared-modules-disabled" - SHLIBEXT="shared_libraries_disabled" - SONAMEFLAG="shared-libraries-disabled" - PICFLAG="" - AC_MSG_CHECKING([SHLD]) - AC_MSG_RESULT([$SHLD]) - AC_MSG_CHECKING([SHLD_FLAGS]) - AC_MSG_RESULT([$SHLD_FLAGS]) - - AC_MSG_CHECKING([MDLD]) - AC_MSG_RESULT([$MDLD]) - AC_MSG_CHECKING([MDLD_FLAGS]) - AC_MSG_RESULT([$MDLD_FLAGS]) - - AC_MSG_CHECKING([SHLIBEXT]) - AC_MSG_RESULT([$SHLIBEXT]) - AC_MSG_CHECKING([SONAMEFLAG]) - AC_MSG_RESULT([$SONAMEFLAG]) - - AC_MSG_CHECKING([PICFLAG]) - AC_MSG_RESULT([$PICFLAG]) fi AC_DEFINE_UNQUOTED(SHLIBEXT, "$SHLIBEXT", [Shared library extension]) diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4 index 1eae998ca4..d932f09a69 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 ####################################################### @@ -37,13 +41,13 @@ ENABLE = YES " ]) -dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags) +dnl SMB_LIBRARY(name,obj_files,required_subsystems,cflags,ldflags) AC_DEFUN([SMB_LIBRARY], [ MAKE_SETTINGS="$MAKE_SETTINGS $1_CFLAGS = $6 $1_LDFLAGS = $7 -$1_ENABLE = YES +n1_ENABLE = YES $1_OBJ_FILES = $2 " @@ -150,3 +154,70 @@ $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 +]) + +dnl SMB_BUILD_RUN(OUTPUT_FILE) +AC_DEFUN([SMB_BUILD_RUN], +[ +AC_OUTPUT_COMMANDS( +[ +test "x$ac_abs_srcdir" != "x$ac_abs_builddir" && ( + cd $builddir; + # NOTE: We *must* use -R so we don't follow symlinks (at least on BSD + # systems). + test -d heimdal || cp -R $srcdir/heimdal $builddir/ + test -d heimdal_build || cp -R $srcdir/heimdal_build $builddir/ + test -d build || builddir="$builddir" \ + srcdir="$srcdir" \ + $PERL ${srcdir}/script/buildtree.pl + ) + +$PERL -I${builddir} -I${builddir}/build \ + -I${srcdir} -I${srcdir}/build \ + ${srcdir}/build/smb_build/main.pl --output=$1 main.mk || exit $? +], +[ +srcdir="$srcdir" +builddir="$builddir" +PERL="$PERL" + +export PERL +export srcdir +export builddir +]) +]) |