2 dnl Check for various functions needed by libvfs.
3 dnl This has various effects:
4 dnl Sets GNOME_VFS_LIBS to libraries required
5 dnl Sets termnet to true or false depending on whether it is required.
6 dnl If yes, defines USE_TERMNET.
7 dnl Sets vfs_flags to "pretty" list of vfs implementations we include.
8 dnl Sets shell variable use_vfs to yes (default, --with-vfs) or
9 dnl "no" (--without-vfs).
10 dnl Calls AC_SUBST(mcserv), which is either empty or "mcserv".
13 AC_DEFUN([GNOME_WITH_VFS],[
14 dnl FIXME: network checks should probably be in their own macro.
15 AC_CHECK_LIB(nsl, t_accept)
16 AC_CHECK_LIB(socket, socket)
19 AC_CHECK_FUNCS(socket, have_socket=yes)
20 if test $have_socket = no; then
21 # socket is not in the default libraries. See if it's in some other.
22 for lib in bsd socket inet; do
23 AC_CHECK_LIB($lib, socket, [
26 AC_DEFINE(HAVE_SOCKET)
32 AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
33 if test $have_gethostbyname = no; then
34 # gethostbyname is not in the default libraries. See if it's in some other.
35 for lib in bsd socket inet; do
36 AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
42 if test $have_socket = yes; then
44 AC_CHECK_FUNCS(pmap_set, , [
45 AC_CHECK_LIB(rpc, pmap_set, [
47 AC_DEFINE(HAVE_PMAP_SET)
49 AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport)
50 dnl add for source routing support setsockopt
51 AC_CHECK_HEADERS(rpc/pmap_clnt.h, , , [
52 #include <sys/types.h>
53 #include <sys/socket.h>
54 #include <netinet/in.h>
56 #include <rpc/pmap_prot.h>
58 vfs_flags="$vfs_flags, mcfs, ftpfs, fish"
68 [--with-samba Support smb virtual file system],[
69 if test "x$withval" != "xno"; then
71 vfs_flags="$vfs_flags, smbfs"
73 SAMBAFILES="\$(SAMBAFILES)"
80 dnl The termnet support
84 [--with-termnet If you want a termified net support],[
85 if test x$withval = xyes; then
86 AC_DEFINE(USE_TERMNET)
93 if $use_net_code; then
94 AC_DEFINE(USE_NETCODE)
97 if test $have_socket = yes; then
112 AC_DEFUN([GNOME_VFS_CHECKS],[
115 [--with-vfs Compile with the VFS code],
119 yes) GNOME_WITH_VFS;;
122 dnl Should we issue a warning?