default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
apply_patch_dir patches &&

# musl has no setuidx/setgidx; do not make the configure probe fatal
sedit '/#define USE_SETUIDX 1/,/Checking whether setuidx is available/s/mandatory=True/mandatory=False/' \
	source3/wscript &&

if [ "scm" = "$SAMBA4_BRANCH" ]; then
  cd source4 &&
  NOCONFIGURE="on" ./autogen.sh
fi
