dnl

dnl ###########################################################################
dnl #									      #
dnl # 	       Autoconf input file for GNU Interactive Tools 4.3.17	      #
dnl #         Copyright (C) 1993-1998 Free Software Foundation, Inc.	      #
dnl #									      #
dnl ###########################################################################


dnl ###############################
dnl # Initialize autoconf stuff.  #
dnl ###############################

AC_REVISION($Revision: 1.10 $)
AC_INIT(src/git.c)
AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.10)


dnl ################################################
dnl # Set up the product name and version number.  #
dnl ################################################

PRODUCT="GNU Interactive Tools"
VERSION=`cat "$srcdir"/version`


dnl ################################################
dnl # Check for a BSD compatible install program.  #
dnl ################################################

AC_PROG_INSTALL

dnl #########################################
dnl # Check for the canonical system name.  #
dnl #########################################

AC_CANONICAL_HOST

HOST=$host


dnl #################################################################
dnl # Check the system type.  We are especially looking for Linux.  #
dnl #################################################################

MAKE="make"

if test "$host_os" = "linux-gnu"; then
    AC_DEFINE(HAVE_LINUX)
    AC_MSG_CHECKING([for Linux SMP machine])
    AC_CACHE_VAL(ac_cv_processors,
    ac_cv_processors="1"
    if test -f /proc/cpuinfo; then
	ac_cv_processors=`cat /proc/cpuinfo|grep processor|wc -l|sed 's/ //g'`
    fi)

    if test "$ac_cv_processors" -ge 2; then
	AC_MSG_RESULT($ac_cv_processors processors)
	MAKE="make -j`expr $ac_cv_processors + 1`"
    else
	AC_MSG_RESULT($ac_cv_processors processor)
    fi
fi


dnl ##########################
dnl # Check the C compiler.  #
dnl ##########################

AC_PROG_CC


dnl ######################################
dnl # Check the command line arguments.  #
dnl ######################################

AC_ARG_WITH(terminfo,
	[  --with-terminfo         use terminfo insted of termcap],
	TERMINFO="$withval",
	TERMINFO=no)

AC_ARG_ENABLE(gcc-warnings,
	[  --enable-gcc-warnings   more gcc warnings for debugging purposes],
	GCC_WARNINGS="$enableval",
	GCC_WARNINGS=no)

AC_ARG_ENABLE(efence,
	[  --enable-efence         link against the Electric Fence library],
	EFENCE="$enableval",
	EFENCE=no)


dnl ################################################
dnl # Increase the warnings level if using GNU C.  #
dnl ################################################

if test "$CC" = "gcc"; then
    AC_DEFINE(HAVE_GCC)
    if test "$GCC_WARNINGS" = "yes"; then
	CFLAGS="$CFLAGS -W -Wall \
-Waggregate-return -Wbad-function-cast \
-Wtraditional -Winline -Wpointer-arith -Wcast-qual"
    else
	AC_DEFINE(NDEBUG)
    fi
else
    AC_DEFINE(NDEBUG)
fi


dnl ###########################################################
dnl # Use the Electric Fence library for debugging purposes.  #
dnl ###########################################################

if test "$EFENCE" = "yes"; then
    LIBS="$LIBS -lefence"
fi


dnl #####################################################################
dnl # Check for some UNIX variants.  These ones need special treatement #
dnl # due to exceptional oddities in their header files or libraries.	#
dnl #####################################################################

AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_CHECK_LIB(sun, getpwnam)


dnl ##############################
dnl # Check the C preprocessor.  #
dnl ##############################

AC_PROG_CPP


dnl #######################################
dnl # Check for standard C header files.  #
dnl #######################################

AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h stdlib.h string.h memory.h values.h)


dnl #############################################
dnl # Check for system dependent header files.  #
dnl #############################################

AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/vfs.h sys/filsys.h fcntl.h)
AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h sys/sioctl.h stddef.h)

dnl Unisys has a broken sys/filsys.h.  We don't want to include it,
dnl considering the fact that other methods are available.
AC_MSG_CHECKING([for broken sys/filsys.h])
AC_CACHE_VAL(ac_cv_broken_sys_filsys_h,
    [AC_TRY_LINK([
#include <sys/types.h>
#ifdef HAVE_SYS_FILSYS_H
#include <sys/filsys.h>
#endif],
		[{}],
		ac_cv_broken_sys_filsys_h=no,
		AC_DEFINE(BROKEN_SYS_FILSYS_H)
		ac_cv_broken_sys_filsys_h=yes)])
AC_MSG_RESULT($ac_cv_broken_sys_filsys_h)


dnl ################################################################
dnl # Check for system specific directory functions declarations.  #
dnl ################################################################

AC_HEADER_DIRENT


dnl #################################################################
dnl # Check whether the C compiler do support the 'const' keyword.  #
dnl #################################################################

AC_C_CONST


dnl ############################################################
dnl # Check for predefined C types.  Fix them if necessary...  #
dnl ############################################################

AC_TYPE_SIGNAL
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_UID_T


dnl ################################################
dnl # Check how to include time.h and sys/time.h.  #
dnl ################################################

AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME


dnl ##########################################################################
dnl # Check whether the system supports long file names.  GIT will issue     #
dnl # a warning at run time if long file names are not supported.  Really!?  #
dnl ##########################################################################

AC_SYS_LONG_FILE_NAMES


dnl #################################
dnl # Check the sys/stat.h macros.  #
dnl #################################

AC_HEADER_STAT


dnl ###############################################
dnl # Check for a POSIX.1 compatible sys/wait.h.  #
dnl ###############################################

AC_HEADER_SYS_WAIT


dnl ###############################################################
dnl # Check whether the system supports the lstat() system call.  #
dnl ###############################################################

AC_CHECK_FUNCS(lstat)


dnl #####################################################
dnl # Check whether the system supports POSIX signals.  #
dnl #####################################################

AC_CHECK_FUNCS(sigaction)


dnl #####################################################################
dnl # Check for the presence of the strerror().  This function is a new #
dnl # feature of ANSI C and many older C systems do not support it yet. #
dnl #####################################################################

AC_CHECK_FUNCS(strerror)


dnl #################################################################
dnl # Check for the presence of the strcasecmp().  This function is #
dnl # derived from BSD 4.3 and other systems might not have it.	    #
dnl #################################################################

AC_CHECK_FUNCS(strcasecmp)


dnl ###################################################################
dnl # Check for the presence of the strcasecmp().  This function is   #
dnl # a GNU extension so only a few systems support it.	 Too bad :-(  #
dnl ###################################################################

AC_CHECK_FUNCS(strncasecmp)


dnl ##############################################################
dnl # Check for the presence of the strstr().  Older BSD systems #
dnl # might not have it.                                         #
dnl ##############################################################

AC_CHECK_FUNCS(strstr)


dnl ###############################################################
dnl # Check for the presence of the memmove().  Older BSD systems #
dnl # might not have it.                                          #
dnl ###############################################################

AC_CHECK_FUNCS(memmove)


dnl ##############################################################
dnl # Check for the presence of the putenv().  Older BSD systems #
dnl # might not have it.                                         #
dnl ##############################################################

AC_CHECK_FUNCS(putenv)


dnl ##############################################################
dnl # Check for the presence of the setenv().  Older BSD systems #
dnl # might use it instead of putenv.                            #
dnl ##############################################################

AC_CHECK_FUNCS(setenv)


dnl ##############################################################
dnl # Check for the presence of the getcwd().  Older BSD systems #
dnl # might not have it.                                         #
dnl ##############################################################

AC_CHECK_FUNCS(getcwd)


dnl ###############################################################
dnl # Check for the presence of the rename().  Older AT&T systems #
dnl # might not have it.                                          #
dnl ###############################################################

AC_CHECK_FUNCS(rename)


dnl #################################################################
dnl # Check for the presence of the readlink().  Older AT&T systems #
dnl # might not have it.                                            #
dnl #################################################################

AC_CHECK_FUNCS(readlink)


dnl ########################################################################
dnl # This configure.in code has been stolen from GNU fileutils-3.12.  Its #
dnl # job is to detect a method to get file system information.	           #
dnl ########################################################################

AC_CHECKING(how to get filesystem space usage)
space=no

# Here we'll compromise a little (and perform only the link test)
# since it seems there are no variants of the statvfs function.
if test $space = no; then
  # SVR4
  AC_CHECK_FUNCS(statvfs)
  if test $ac_cv_func_statvfs = yes; then
    space=yes
    AC_DEFINE(STAT_STATVFS)
  fi
fi

if test $space = no; then
  # DEC Alpha running OSF/1
  AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
  AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
  [AC_TRY_RUN([
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#include <sys/types.h>
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    exit (statfs (".", &fsd, sizeof (struct statfs)));
  }],
  fu_cv_sys_stat_statfs3_osf1=yes,
  fu_cv_sys_stat_statfs3_osf1=no,
  fu_cv_sys_stat_statfs3_osf1=no)])
  AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
  if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
    space=yes
    AC_DEFINE(STAT_STATFS3_OSF1)
  fi
fi

if test $space = no; then
# AIX
  AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
member (AIX, 4.3BSD)])
  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
  [AC_TRY_RUN([
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
  main ()
  {
    struct statfs fsd;
    fsd.f_bsize = 0;
    exit (statfs (".", &fsd));
  }],
  fu_cv_sys_stat_statfs2_bsize=yes,
  fu_cv_sys_stat_statfs2_bsize=no,
  fu_cv_sys_stat_statfs2_bsize=no)])
  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
  if test $fu_cv_sys_stat_statfs2_bsize = yes; then
    space=yes
    AC_DEFINE(STAT_STATFS2_BSIZE)
  fi
fi

if test $space = no; then
# SVR3
  AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
  AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
  [AC_TRY_RUN([
#include <sys/types.h>
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
  main ()
  {
    struct statfs fsd;
    exit (statfs (".", &fsd, sizeof fsd, 0));
  }],
    fu_cv_sys_stat_statfs4=yes,
    fu_cv_sys_stat_statfs4=no,
    fu_cv_sys_stat_statfs4=no)])
  AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
  if test $fu_cv_sys_stat_statfs4 = yes; then
    space=yes
    AC_DEFINE(STAT_STATFS4)
  fi
fi

if test $space = no; then
# 4.4BSD and NetBSD
  AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
member (4.4BSD and NetBSD)])
  AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
  [AC_TRY_RUN([
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
  main ()
  {
    struct statfs fsd;
    fsd.f_fsize = 0;
    exit (statfs (".", &fsd));
  }],
  fu_cv_sys_stat_statfs2_fsize=yes,
  fu_cv_sys_stat_statfs2_fsize=no,
  fu_cv_sys_stat_statfs2_fsize=no)])
  AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
  if test $fu_cv_sys_stat_statfs2_fsize = yes; then
    space=yes
    AC_DEFINE(STAT_STATFS2_FSIZE)
  fi
fi

if test $space = no; then
  # Ultrix
  AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
  AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
  [AC_TRY_RUN([
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_FS_TYPES_H
#include <sys/fs_types.h>
#endif
  main ()
  {
    struct fs_data fsd;
    /* Ultrix's statfs returns 1 for success,
       0 for not mounted, -1 for failure.  */
    exit (statfs (".", &fsd) != 1);
  }],
  fu_cv_sys_stat_fs_data=yes,
  fu_cv_sys_stat_fs_data=no,
  fu_cv_sys_stat_fs_data=no)])
  AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
  if test $fu_cv_sys_stat_fs_data = yes; then
    space=yes
    AC_DEFINE(STAT_STATFS2_FS_DATA)
  fi
fi

dnl Not supported
dnl if test $space = no; then
dnl # SVR2
dnl AC_TRY_CPP([#include <sys/filsys.h>],
dnl   AC_DEFINE(STAT_READ_FILSYS) space=yes)
dnl fi


dnl ###########################################################################
dnl # If the GNU readline library is installed on the system, we will use its #
dnl # tilde_expand() and history functions.  Otherwise, we have  to  use  the #
dnl # versions of tilde.c and history.c included in the package.  These files #
dnl # belong to the GNU readline library version 2.0.1.			      #
dnl ###########################################################################

AC_CHECK_LIB(readline, tilde_expand)
AC_FUNC_CHECK(tilde_expand,,
	      GIT_OBJS="$GIT_OBJS tilde.o"
	      GITPS_OBJS="$GITPS_OBJS tilde.o"
	      GITVIEW_OBJS="$GITVIEW_OBJS tilde.o")
AC_FUNC_CHECK(using_history,,
	      GIT_OBJS="$GIT_OBJS history.o")


dnl ###################################################################
dnl # Check for compilers that do not support constructs combinations #
dnl # of ANSI C like prototypes & K&R definitions.  B.O.S. systems.   #
dnl ###################################################################

AC_MSG_CHECKING([for dumb C compiler])

AC_CACHE_VAL(git_cv_dumb_cc,
    AC_TRY_LINK(
	[void tst(char);
	 void tst(i)
	     char i;
	 {}],
	[{
	    tst('A');
	}],
	git_cv_dumb_cc=no,
	git_cv_dumb_cc=yes)
)

if test "$git_cv_dumb_cc" = "yes"; then
    AC_DEFINE(HAVE_DUMB_CC)
fi

AC_MSG_RESULT([$git_cv_dumb_cc])


dnl ##########################################
dnl # Check if struct utsname is available.  #
dnl ##########################################

AC_MSG_CHECKING([for struct utsname])

AC_CACHE_VAL(git_cv_struct_utsname,
    AC_TRY_LINK([
#include <sys/utsname.h>],
	[{
	    char *ptr;
	    struct utsname u;

	    uname(&u);
	    ptr = u.nodename;
	    ptr = u.sysname;
	    ptr = u.machine;
	}],
	git_cv_struct_utsname=yes,
	git_cv_struct_utsname=no)
)

if test "$git_cv_struct_utsname" = "yes"; then
    AC_DEFINE(HAVE_UTSNAME)
fi

AC_MSG_RESULT([$git_cv_struct_utsname])


dnl ###################################################
dnl # Check for POSIX compatible terminal interface.  #
dnl ###################################################

AC_MSG_CHECKING([for POSIX compatible terminal interface])

AC_CACHE_VAL(git_cv_sys_posix_tty,
    AC_TRY_LINK([
#include <termios.h>],
	[{
	    struct termios term;

	    tcgetattr(0, &term);
	}],
	git_cv_sys_posix_tty=yes,
	git_cv_sys_posix_tty=no)
)

if test "$git_cv_sys_posix_tty" = "yes"; then
    AC_DEFINE(HAVE_POSIX_TTY)
fi

AC_MSG_RESULT([$git_cv_sys_posix_tty])


dnl ######################################################
dnl # Check for System V compatible terminal interface.  #
dnl ######################################################

AC_MSG_CHECKING([for System V compatible terminal interface])

AC_CACHE_VAL(git_cv_sys_systemv_tty,
    AC_TRY_LINK([
#include <termio.h>],
	[{
	    struct termio term;

	    ioctl(0, TCGETA, &term);
	}],
	git_cv_sys_systemv_tty=yes,
	git_cv_sys_systemv_tty=no)
)

if test "$git_cv_sys_systemv_tty" = "yes"; then
    AC_DEFINE(HAVE_SYSTEMV_TTY)
fi

AC_MSG_RESULT([$git_cv_sys_systemv_tty])


dnl #################################################
dnl # Check for BSD compatible terminal interface.  #
dnl #################################################

AC_MSG_CHECKING([for BSD compatible terminal interface])

AC_CACHE_VAL(git_cv_sys_bsd_tty,
    AC_TRY_LINK([
#include <sgtty.h>],
	[{
	    struct sgttyb arg;
	    struct tchars targ;
	    struct ltchars ltarg;

	    ioctl(0, TIOCGETP,&arg);
	    ioctl(0, TIOCGETC,&targ);
	    ioctl(0, TIOCGLTC,&ltarg);
	}],
	git_cv_sys_bsd_tty=yes,
	git_cv_sys_bsd_tty=no
    )
)

if test "$git_cv_sys_bsd_tty" = "yes"; then
    AC_DEFINE(HAVE_BSD_TTY)
fi

AC_MSG_RESULT([$git_cv_sys_bsd_tty])


dnl #################################################
dnl # Check if ioctl(1, TIOCGWINSZ, &winsz) works.  #
dnl #################################################

AC_MSG_CHECKING([for struct winsz])

AC_CACHE_VAL(git_cv_struct_winsz,
    AC_TRY_LINK([
#include <sys/types.h>
#include <sys/ioctl.h>
#ifdef HAVE_POSIX_TTY
#include <termios.h>
#else
#ifdef HAVE_SYSTEMV_TTY
#include <termio.h>
#else
#include <sgtty.h>
#endif /* HAVE_SYSTEMV_TTY */
#endif /* HAVE_POSIX_TTY */
#if defined TIOCGSIZE && !defined TIOCGWINSZ
#define TIOCGWINSZ TIOCGSIZE
#endif],
	[{
	    struct winsize winsz;
	    ioctl(1, TIOCGWINSZ, &winsz);
	    winsz.ws_col = winsz.ws_row;
	}],
	git_cv_struct_winsz=yes,
	git_cv_struct_winsz=no)
)

if test "$git_cv_struct_winsz" = "yes"; then
    AC_DEFINE(HAVE_WINSZ)
fi

AC_MSG_RESULT([$git_cv_struct_winsz])


dnl ####################################################
dnl # Check the terminal capabilities library to use.  #
dnl ####################################################

define(git_TERMINFO_LIBRARY,
[    AC_CHECK_LIB(ncurses, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
				 LIBS="$LIBS -lncurses"
				 TERMLIB_FOUND=yes,
	AC_CHECK_LIB(termlib, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
				    LIBS="$LIBS -ltermlib"
				    TERMLIB_FOUND=yes,
	    AC_CHECK_LIB(curses, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
				       LIBS="$LIBS -lcurses"
				       TERMLIB_FOUND=yes,
		AC_CHECK_LIB(tinfo, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
					  LIBS="$LIBS -ltinfo"
					  TERMLIB_FOUND=yes,
		    AC_CHECK_LIB(terminfo, tgetent, AC_DEFINE(HAVE_LIBTERMINFO)
						 LIBS="$LIBS -lterminfo"
						 TERMLIB_FOUND=yes,
			TERMLIB_FOUND=no
		    )
		)
	    )
	)
    )
]
)dnl

if test "$TERMINFO" = "yes"; then
    git_TERMINFO_LIBRARY
    if test "$TERMLIB_FOUND" = "no"; then
	AC_CHECK_LIB(termcap, tgetent,
		     AC_DEFINE(HAVE_LIBTERMCAP)
		     LIBS="$LIBS -ltermcap"
		     TERMLIB_FOUND="yes")
    fi
else
    AC_CHECK_LIB(termcap, tgetent,
		 AC_DEFINE(HAVE_LIBTERMCAP)
		 LIBS="$LIBS -ltermcap"
		 TERMLIB_FOUND="yes",
		 git_TERMINFO_LIBRARY)
fi

if test "$TERMLIB_FOUND" = "no"; then
    AC_MSG_ERROR([no library for handling terminal capabilities])
fi


dnl #####################################################################
dnl # Check for the presence of the makeinfo utility.  If we can't find #
dnl # it, we can't build the info documentation.			#
dnl #####################################################################

AC_PROGRAM_CHECK(MAKEINFO, makeinfo, makeinfo, false)
if test "$MAKEINFO" = "false"; then
    AC_MSG_WARN(***** makeinfo utility not found *****)
fi


dnl #####################################################################
dnl # Check for the presence of the texi2dvi utility.  If we can't find #
dnl # it, we can't build the dvi documentation.				#
dnl #####################################################################

AC_PROGRAM_CHECK(TEXI2DVI, texi2dvi, texi2dvi, false)
if test "$TEXI2DVI" = "false"; then
    AC_MSG_WARN(***** texi2dvi utility not found *****)
fi


dnl ######################################################################
dnl # Check for the presence of the texi2html utility.  If we can't find #
dnl # it, we can't build the html documentation.			 #
dnl ######################################################################

AC_PROGRAM_CHECK(TEXI2HTML, texi2html, texi2html, false)
if test "$TEXI2HTML" = "false"; then
    AC_MSG_WARN(***** texi2html utility not found *****)
fi


dnl ##########################################################################
dnl # According to Joachim Baumann, for Solaris 2.3 & Solaris 2.4 (at least) #
dnl # -lucb should be included after -ltermcap.  This hasn't been tested!    #
dnl ##########################################################################

if test "$TERMINFO" = "no"; then
    if test "$host_os" = "solaris2.3" || test "$host_os" = "solaris2.4"; then
	AC_CHECK_LIB(ucb, tgetent, , , $LIBS)
    fi
fi


dnl ####################################################################
dnl # Make sure we don't fail to rebuild targets if things are already #
dnl # compiled and the prefix has changed.  An ugly hack :-(	       #
dnl ####################################################################

rm -f src/misc.o 2> /dev/null


dnl #######################################
dnl # Make final variable substitutions.  #
dnl #######################################

AC_SUBST(PRODUCT)dnl
AC_SUBST(VERSION)dnl
AC_SUBST(HOST)dnl
AC_SUBST(MAKE)dnl
AC_SUBST(INSTALL)dnl
AC_SUBST(INSTALL_PROGRAM)dnl
AC_SUBST(INSTALL_DATA)dnl
AC_SUBST(CFLAGS)dnl
AC_SUBST(GIT_OBJS)dnl
AC_SUBST(GITPS_OBJS)dnl
AC_SUBST(GITVIEW_OBJS)dnl


dnl #################
dnl # Almost done.  #
dnl #################

AC_OUTPUT(Makefile src/Makefile info/Makefile man/Makefile term/Makefile
	  html/Makefile version.h prefix term/.gitrc.common)


dnl ############################################################
dnl # Another ugly hack needed to make the prefix stuff work.  #
dnl ############################################################

echo "creating links to prefix"

rm -f src/prefix info/prefix man/prefix term/prefix html/prefix

ln prefix src  2> /dev/null
ln prefix info 2> /dev/null
ln prefix man  2> /dev/null
ln prefix term 2> /dev/null
ln prefix html 2> /dev/null
