From 5d887987020ee47b8f74ebdcadb43b594cc96c8d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 24 Jul 1998 06:19:39 +0000 Subject: Actually add files mentioned in last commit svn path=/trunk/; revision=287 --- macros/gnome-undelfs.m4 | 20 +++++++++++++ macros/gnome-vfs.m4 | 80 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 macros/gnome-undelfs.m4 create mode 100644 macros/gnome-vfs.m4 diff --git a/macros/gnome-undelfs.m4 b/macros/gnome-undelfs.m4 new file mode 100644 index 0000000..c8ea6f4 --- /dev/null +++ b/macros/gnome-undelfs.m4 @@ -0,0 +1,20 @@ +dnl GNOME_UNDELFS_CHECKS +dnl Check for ext2fs undel support. +dnl Set shell variable ext2fs_undel to "yes" if we have it, +dnl "no" otherwise. May define USE_EXT2FSLIB for cpp. +dnl Will set EXT2FS_UNDEL_LIBS to required libraries. + +AC_DEFUN([GNOME_UNDELFS_CHECKS], [ + AC_CHECK_HEADERS(ext2fs/ext2fs.h linux/ext2_fs.h) + ext2fs_undel=no + EXT2FS_UNDEL_LIBS= + if test x$ac_cv_header_ext2fs_ext2fs_h = xyes + then + if test x$ac_cv_header_linux_ext2_fs_h = xyes + then + AC_DEFINE(USE_EXT2FSLIB) + ext2fs_undel=yes + EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err" + fi + fi +]) diff --git a/macros/gnome-vfs.m4 b/macros/gnome-vfs.m4 new file mode 100644 index 0000000..29296ee --- /dev/null +++ b/macros/gnome-vfs.m4 @@ -0,0 +1,80 @@ +dnl GNOME_VFS_CHECKS +dnl Check for various functions needed by libvfs. +dnl This has various effects: +dnl Sets GNOME_VFS_LIBS to libraries required +dnl Sets termnet to true or false depending on whether it is required. +dnl If yes, defines USE_TERMNET. +dnl Sets vfs_flags to "pretty" list of vfs implementations we include. +dnl Calls AC_SUBST(mcserv), which is either empty or "mcserv". + +AC_DEFUN([GNOME_VFS_CHECKS],[ + dnl FIXME: network checks should probably be in their own macro. + AC_CHECK_LIB(nsl, t_accept) + AC_CHECK_LIB(socket, socket) + + have_socket=no + AC_CHECK_FUNCS(socket, have_socket=yes) + if test $have_socket = no; then + # socket is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, socket, [ + LIBS="$LIBS -l$lib" + have_socket=yes + AC_DEFINE(HAVE_SOCKET) + break]) + done + fi + + have_gethostbyname=no + AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes) + if test $have_gethostbyname = no; then + # gethostbyname is not in the default libraries. See if it's in some other. + for lib in bsd socket inet; do + AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break]) + done + fi + + + vfs_flags="tarfs" + use_net_code=false + if test $have_socket = yes; then + AC_STRUCT_LINGER + AC_CHECK_FUNCS(pmap_set, , [ + AC_CHECK_LIB(rpc, pmap_set, [ + LIBS="-lrpc $LIBS" + AC_DEFINE(HAVE_PMAP_SET) + ])]) + AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport) + dnl add for source routing support setsockopt + AC_CHECK_HEADERS(rpc/pmap_clnt.h) + vfs_flags="$vfs_flags, mcfs, ftpfs" + use_net_code=true + fi + + dnl + dnl The termnet support + dnl + termnet=false + AC_ARG_WITH(termnet, + [--with-termnet If you want a termified net support],[ + if test x$withval = xyes; then + AC_DEFINE(USE_TERMNET) + termnet=true + fi + ]) + + TERMNET="" + AC_DEFINE(USE_VFS) + if $use_net_code; then + AC_DEFINE(USE_NETCODE) + fi + mcserv= + if test $have_socket = yes; then + mcserv="mcserv" + if $termnet; then + TERMNET="-ltermnet" + fi + fi + AC_SUBST(TERMNET) + AC_SUBST(mcserv) +]) -- cgit v1.2.1