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
vfs_flags="$vfs_flags, mcfs, ftpfs, fish"
62
[--with-samba Support smb virtual file system],[
63
if test "x$withval != xno"; then
65
vfs_flags="$vfs_flags, smbfs"
67
SAMBAFILES="\$(SAMBAFILES)"
74
dnl The termnet support
78
[--with-termnet If you want a termified net support],[
79
if test x$withval = xyes; then
80
AC_DEFINE(USE_TERMNET)
87
if $use_net_code; then
88
AC_DEFINE(USE_NETCODE)
91
if test $have_socket = yes; then
106
AC_DEFUN([GNOME_VFS_CHECKS],[
109
[--with-vfs Compile with the VFS code],
113
yes) GNOME_WITH_VFS;;
116
dnl Should we issue a warning?