ninja=""
gio="$default_feature"
skip_meson=no
-slirp_smbd="$default_feature"
# The following Meson options are handled manually (still they
# are included in the automatically generated help message)
ld="${LD-${cross_prefix}ld}"
ranlib="${RANLIB-${cross_prefix}ranlib}"
nm="${NM-${cross_prefix}nm}"
+smbd="$SMBD"
strip="${STRIP-${cross_prefix}strip}"
windres="${WINDRES-${cross_prefix}windres}"
pkg_config_exe="${PKG_CONFIG-${cross_prefix}pkg-config}"
sunos)
solaris="yes"
make="${MAKE-gmake}"
- smbd="${SMBD-/usr/sfw/sbin/smbd}"
# needed for CMSG_ macros in sys/socket.h
QEMU_CFLAGS="-D_XOPEN_SOURCE=600 $QEMU_CFLAGS"
# needed for TIOCWIN* defines in termios.h
;;
--disable-gio) gio=no
;;
- --enable-slirp-smbd) slirp_smbd=yes
- ;;
- --disable-slirp-smbd) slirp_smbd=no
- ;;
# backwards compatibility options
--enable-trace-backend=*) meson_option_parse "--enable-trace-backends=$optarg" "$optarg"
;;
opengl opengl support
tools build qemu-io, qemu-nbd and qemu-img tools
gio libgio support
- slirp-smbd use smbd (at path --smbd=*) in slirp networking
NOTE: The object files are built at the place where configure is launched
EOF
;;
esac
-# Check for slirp smbd dupport
-: ${smbd=${SMBD-/usr/sbin/smbd}}
-if test "$slirp_smbd" != "no" ; then
- if test "$mingw32" = "yes" ; then
- if test "$slirp_smbd" = "yes" ; then
- error_exit "Host smbd not supported on this platform."
- fi
- slirp_smbd=no
- else
- slirp_smbd=yes
- fi
-fi
-
##########################################
# check for usable __NR_keyctl syscall
if test "$guest_agent" = "yes" ; then
echo "CONFIG_GUEST_AGENT=y" >> $config_host_mak
fi
-if test "$slirp_smbd" = "yes" ; then
- echo "CONFIG_SLIRP_SMBD=y" >> $config_host_mak
- echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
-fi
echo "CONFIG_BDRV_RW_WHITELIST=$block_drv_rw_whitelist" >> $config_host_mak
echo "CONFIG_BDRV_RO_WHITELIST=$block_drv_ro_whitelist" >> $config_host_mak
qemu_version=$(head $source_path/VERSION)
-Ddocdir="$docdir" \
-Dqemu_firmwarepath="$firmwarepath" \
-Dqemu_suffix="$qemu_suffix" \
+ -Dsmbd="$smbd" \
-Dsphinx_build="$sphinx_build" \
-Dtrace_file="$trace_file" \
-Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \
config_host_data.set_quoted('CONFIG_QEMU_MODDIR', get_option('prefix') / qemu_moddir)
config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_option('sysconfdir'))
+have_slirp_smbd = get_option('slirp_smbd') \
+ .require(targetos != 'windows', error_message: 'Host smbd not supported on this platform.') \
+ .allowed()
+if have_slirp_smbd
+ smbd_path = get_option('smbd')
+ if smbd_path == ''
+ smbd_path = (targetos == 'solaris' ? '/usr/sfw/sbin/smbd' : '/usr/sbin/smbd')
+ endif
+ config_host_data.set_quoted('CONFIG_SMBD_COMMAND', smbd_path)
+endif
+
config_host_data.set('HOST_' + host_arch.to_upper(), 1)
config_host_data.set('CONFIG_ATTR', libattr.found())
if targetos == 'windows' and config_host.has_key('CONFIG_GUEST_AGENT')
summary_info += {'wixl': wixl}
endif
-if slirp_opt != 'disabled' and 'CONFIG_SLIRP_SMBD' in config_host
- summary_info += {'smbd': config_host['CONFIG_SMBD_COMMAND']}
+if slirp_opt != 'disabled' and have_system
+ summary_info += {'smbd': have_slirp_smbd ? smbd_path : false}
endif
summary(summary_info, bool_yn: true, section: 'Host binaries')
description: 'Base directory for documentation installation (can be empty)')
option('qemu_firmwarepath', type : 'string', value : '',
description: 'search PATH for firmware files')
+option('smbd', type : 'string', value : '',
+ description: 'Path to smbd for slirp networking')
option('sphinx_build', type : 'string', value : '',
description: 'Use specified sphinx-build [$sphinx_build] for building document (default to be empty)')
option('default_devices', type : 'boolean', value : true,
description: 'QEMU profiling with gprof')
option('profiler', type: 'boolean', value: false,
description: 'profiler support')
+option('slirp_smbd', type : 'feature', value : 'auto',
+ description: 'use smbd (at path --smbd=*) in slirp networking')
#include "net/slirp.h"
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
#include <pwd.h>
#include <sys/wait.h>
#endif
Slirp *slirp;
Notifier poll_notifier;
Notifier exit_notifier;
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
gchar *smb_dir;
#endif
GSList *fwd;
static int slirp_hostfwd(SlirpState *s, const char *redir_str, Error **errp);
static int slirp_guestfwd(SlirpState *s, const char *config_str, Error **errp);
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
static int slirp_smb(SlirpState *s, const char *exported_dir,
struct in_addr vserver_addr, Error **errp);
static void slirp_smb_cleanup(SlirpState *s);
struct in6_addr ip6_prefix;
struct in6_addr ip6_host;
struct in6_addr ip6_dns;
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
struct in_addr smbsrv = { .s_addr = 0 };
#endif
NetClientState *nc;
return -1;
}
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
if (vsmbserver && !inet_aton(vsmbserver, &smbsrv)) {
error_setg(errp, "Failed to parse SMB address");
return -1;
}
}
}
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
if (smb_export) {
if (slirp_smb(s, smb_export, smbsrv, errp) < 0) {
goto error;
}
-#if defined(CONFIG_SLIRP_SMBD)
+#if defined(CONFIG_SMBD_COMMAND)
/* automatic user mode samba server configuration */
static void slirp_smb_cleanup(SlirpState *s)
return 0;
}
-#endif /* defined(CONFIG_SLIRP_SMBD) */
+#endif /* defined(CONFIG_SMBD_COMMAND) */
static int guestfwd_can_read(void *opaque)
{
"fuzzing_engine",
"qemu_firmwarepath",
"qemu_suffix",
+ "smbd",
"sphinx_build",
"trace_file",
}
printf "%s\n" ' sdl-image SDL Image support for icons'
printf "%s\n" ' seccomp seccomp support'
printf "%s\n" ' selinux SELinux support in qemu-nbd'
+ printf "%s\n" ' slirp-smbd use smbd (at path --smbd=*) in slirp networking'
printf "%s\n" ' smartcard CA smartcard emulation support'
printf "%s\n" ' snappy snappy compression support'
printf "%s\n" ' sparse sparse checker'
--enable-slirp) printf "%s" -Dslirp=enabled ;;
--disable-slirp) printf "%s" -Dslirp=disabled ;;
--enable-slirp=*) quote_sh "-Dslirp=$2" ;;
+ --enable-slirp-smbd) printf "%s" -Dslirp_smbd=enabled ;;
+ --disable-slirp-smbd) printf "%s" -Dslirp_smbd=disabled ;;
--enable-smartcard) printf "%s" -Dsmartcard=enabled ;;
--disable-smartcard) printf "%s" -Dsmartcard=disabled ;;
--enable-snappy) printf "%s" -Dsnappy=enabled ;;