mc/configure.in

814 lines
18 KiB
Plaintext
Raw Normal View History

1998-02-27 07:54:42 +03:00
dnl
dnl Configure.in file for the Midnight Commander
dnl
AC_INIT(GNU Midnight Commander, 4.5.99a, mc-devel@gnome.org)
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(mc, 4.5.99a)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
1998-02-27 07:54:42 +03:00
AC_PROG_LN_S
AC_CANONICAL_HOST
1998-02-27 07:54:42 +03:00
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_PROG_CC_STDC
1998-02-27 07:54:42 +03:00
AC_HEADER_MAJOR
AC_C_CONST
AC_SYS_LARGEFILE
AC_CHECK_TOOL(AR, ar, ar)
1998-02-27 07:54:42 +03:00
dnl Only list browsers here that can be run in background (i.e. with `&')
AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla konqueror opera netscape])
1998-02-27 07:54:42 +03:00
if test x$ALL_LINGUAS = x; then
ALL_LINGUAS="az ca cs da de el es es_ES fi fr hu it ja ko lv nl no pl pt_BR ro ru sk sl sv uk ta tr wa zh_TW zh_CN.GB2312"
fi
dnl
dnl Internationalization
dnl
AM_GNU_GETTEXT
if test "x$USE_INCLUDED_LIBINTL" = xyes; then
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
fi
dnl
dnl Hack to make extraconf.h visible even if compiling outside srcdir.
dnl
CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)"
1998-02-27 07:54:42 +03:00
dnl
dnl Enforce coding standards
1998-02-27 07:54:42 +03:00
dnl
if test "x$GCC" = xyes; then
CFLAGS="$CFLAGS -Wall"
1998-02-27 07:54:42 +03:00
fi
dnl
dnl We now use glib
dnl
AM_PATH_GLIB(1.2.0,,[AC_MSG_ERROR([Test for GLIB failed. MC requires GLIB.])])
LIBS="$LIBS $GLIB_LIBS"
1998-02-27 07:54:42 +03:00
dnl
dnl OS specific flags.
1998-02-27 07:54:42 +03:00
dnl
posix_libs=""
case $host_os in
aux*)
# A/UX
1998-02-27 07:54:42 +03:00
posix_libs="-lposix"
AC_DEFINE(_POSIX_SOURCE)
;;
sco*)
AC_DEFINE(SCO_FLAVOR, 1, [Define if you want to turn on SCO-specific code])
AC_DEFINE(_SVID3, 1, [Needs to be defined on SCO])
;;
esac
1998-02-27 07:54:42 +03:00
AC_PROG_INSTALL
AC_CHECK_HEADERS([unistd.h string.h memory.h crypt.h grp.h limits.h \
2001-09-07 21:23:49 +04:00
malloc.h stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h \
sys/time.h sys/timeb.h sys/select.h sys/ioctl.h stropts.h])
1998-02-27 07:54:42 +03:00
AC_HEADER_TIME
1998-02-27 07:54:42 +03:00
AC_HEADER_SYS_WAIT
AC_HEADER_DIRENT
AC_SHORT_D_NAME_LEN
AC_HEADER_STDC
dnl Missing structure components
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
AC_STRUCT_ST_RDEV
dnl
dnl Check availability of some functions
dnl
AC_CHECK_FUNCS([strerror statfs strcasecmp strncasecmp strftime \
strdup memmove pwdauth truncate initgroups putenv \
memset memcpy tcsetattr tcgetattr cfgetospeed \
sigaction sigemptyset sigprocmask sigaddset \
sysconf setuid setreuid telldir seekdir])
1998-02-27 07:54:42 +03:00
dnl
dnl getpt is a GNU Extension (glibc 2.1.x)
dnl
AC_CHECK_FUNCS(getpt)
1998-02-27 07:54:42 +03:00
SHADOWLIB=
case $host_os in
linux*)
AC_CHECK_LIB(shadow,pw_encrypt,
[shadow_header=yes
AC_CHECK_HEADERS(shadow.h,,
[AC_CHECK_HEADERS(shadow/shadow.h,,
[shadow_header=no])])
if test $shadow_header = yes; then
AC_DEFINE(LINUX_SHADOW, 1,
[Define to use shadow passwords on Linux])
SHADOWLIB=-lshadow
fi])
;;
esac
1998-02-27 07:54:42 +03:00
AC_SUBST(SHADOWLIB)
NEED_CRYPT_PROTOTYPE=yes
if test x$ac_cv_header_crypt_h = xyes; then
AC_TRY_WARNINGS([#include <crypt.h>], [char *p = crypt("xxx", "yyy");
if (p)
return 0;],[
1998-02-27 07:54:42 +03:00
NEED_CRYPT_PROTOTYPE=no])
else
if test x$ac_cv_header_unistd_h = xyes; then
AC_TRY_WARNINGS([#include <unistd.h>], [char *p = crypt("xxx", "yyy");
if (p)
return 0;],[
1998-02-27 07:54:42 +03:00
NEED_CRYPT_PROTOTYPE=no])
fi
fi
if test x$NEED_CRYPT_PROTOTYPE = xyes; then
AC_DEFINE(NEED_CRYPT_PROTOTYPE, 1,
[Define if function `crypt' needs a prototype])
1998-02-27 07:54:42 +03:00
fi
dnl
dnl On SCO and some SVR4, crypt is on libcrypt.a
1998-02-27 07:54:42 +03:00
dnl grantpt in libpt.a
dnl
LCRYPT=""
1998-02-27 07:54:42 +03:00
AC_CHECK_FUNCS(crypt, , [
AC_CHECK_LIB(crypt, crypt, [LCRYPT="-lcrypt"], [
AC_CHECK_LIB(crypt_i, crypt, [LCRYPT="-lcrypt_i"])])])
AC_SUBST(LCRYPT)
1998-02-27 07:54:42 +03:00
AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
1998-02-27 07:54:42 +03:00
dnl replacing lstat with statlstat on sco makes it more portable between
dnl sco clones
AC_CHECK_FUNCS(statlstat)
dnl
dnl If running under AIX, AC_AIX does not tell us that
dnl
AC_MSG_CHECKING([for AIX defines])
1998-02-27 07:54:42 +03:00
AC_EGREP_CPP(yes,
[#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
yes
#endif
], [
AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
1998-02-27 07:54:42 +03:00
AC_MSG_RESULT(yes)
], [AC_MSG_RESULT(no)])
1998-02-27 07:54:42 +03:00
dnl
dnl This is from GNU fileutils, check aclocal.m4 for more information
dnl
AC_GET_FS_INFO
dnl
dnl Missing typedefs and replacements
dnl
AC_TYPE_MODE_T
AC_CHECK_TYPE(umode_t, int)
AC_CHECK_TYPE(off_t, long)
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_CHECK_TYPE(nlink_t, unsigned int)
1998-02-27 07:54:42 +03:00
AC_FUNC_MMAP
AC_FUNC_ALLOCA
AC_FUNC_STRCOLL
1998-02-27 07:54:42 +03:00
dnl
dnl X11 support.
dnl
dnl These variables are only used when building the MC binary
MCCFLAGS=""
MCLIBS=""
AC_SUBST(MCCFLAGS)
AC_SUBST(MCLIBS)
textmode_x11_support="no"
AC_ARG_WITH(tm-x-support,
[--with-tm-x-support Try getting events from X Window System],
[if test x$withval = xyes; then
AC_PATH_XTRA
MCCFLAGS="$X_CFLAGS"
MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT, 1,
[Define to enable getting events from X Window System])
textmode_x11_support="yes"
fi
])
1998-02-27 07:54:42 +03:00
dnl
dnl Network related functions
dnl
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])
1998-02-27 07:54:42 +03:00
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])
1998-02-27 07:54:42 +03:00
done
fi
AC_CHECK_FUNCS(socketpair)
dnl
dnl Sequent wants getprocessstats
dnl
AC_CHECK_LIB(seq, get_process_stats, [
LIBS="$LIBS -lseq"
AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
[Define if you have function `get_process_stats' and
have to use that instead of gettimeofday])])
1998-02-27 07:54:42 +03:00
MC_VFS_CHECKS
dnl
dnl Install mcserv only if explicitly enabled
dnl
AC_ARG_ENABLE([mcserv-install],
[--enable-mcserv-install Install mcserv - Midnight Commander file server])
NETFILES=
1998-02-27 07:54:42 +03:00
if test $have_socket = yes; then
NETFILES="\$(NETFILES)"
1998-02-27 07:54:42 +03:00
fi
AC_SUBST(NETFILES)
vfs_type="normal"
if test $use_vfs = yes
then
AC_MSG_NOTICE([enabling VFS code])
vfs_type="Midnight Commander Virtual File System"
fi
1998-02-27 07:54:42 +03:00
screen_manager=unknown
search_ncurses=false
mouse_lib="xterm only"
case $host_os in
linux*)
AC_ARG_WITH(gpm-mouse,
[--with-gpm-mouse[=base-dir] Compile with gpm mouse support (Linux only)],
[if test x$withval != xno
1998-02-27 07:54:42 +03:00
then
if test x$withval != xyes
then
LIBS="$LIBS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
fi
AC_DEFINE(HAVE_LIBGPM, 1,
[Define to enable gpm mouse support on Linux])
1998-02-27 07:54:42 +03:00
mouse_lib="GPM and xterm"
MCLIBS="-lgpm $MCLIBS"
fi],
[AC_CHECK_LIB(gpm, Gpm_Repeat,
[AC_DEFINE(HAVE_LIBGPM)
1998-02-27 07:54:42 +03:00
mouse_lib="GPM and xterm"
MCLIBS="-lgpm $MCLIBS"],
[AC_MSG_WARN([libgpm is missing or older than 0.18])],
[$LIBS])
])
;;
esac
1998-02-27 07:54:42 +03:00
AC_ARG_WITH(ncurses,
[--with-ncurses[=base-dir] Compile with ncurses/locate base dir],
[if test x$withval = xyes
1998-02-27 07:54:42 +03:00
then
search_ncurses=true
else
MCLIBS="$MCLIBS -L$withval/lib -lncurses"
1998-02-27 07:54:42 +03:00
CPPFLAGS="$CPPFLAGS -I$withval/include"
search_ncurses=false
screen_manager="ncurses"
AC_DEFINE(USE_NCURSES)
fi
])
1998-02-27 07:54:42 +03:00
AC_ARG_WITH(hsc,
[--with-hsc Compile with support for the HSC firewall],
[if test x$withval = xyes; then
AC_DEFINE(HSC_PROXY, 1,
[Define if you want to use the HSC firewall])
1998-02-27 07:54:42 +03:00
fi
])
1998-02-27 07:54:42 +03:00
dnl
dnl Check for the -mandoc package
dnl
AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
if $HAVE_nroff; then
AC_MSG_CHECKING([for manual formatting macros])
1998-02-27 07:54:42 +03:00
AC_CACHE_VAL(ac_cv_mandoc, [
nroff -mandoc < /dev/null > /dev/null 2>&1
1998-02-27 07:54:42 +03:00
if test $? = 0
then
ac_cv_mandoc=-mandoc
else
ac_cv_mandoc=-man
fi
])
MANDOC=$ac_cv_mandoc
AC_MSG_RESULT([$MANDOC])
1998-02-27 07:54:42 +03:00
else
MANDOC=-man
fi
AC_SUBST(MANDOC)
dnl
1999-09-19 Andrew V. Samoilov <sav@bcs.zp.ua> * src/user.c (check_patterns): char* is used instead of char [] in sizeof * src/util.c (string_perm): prefix named pipes by 'p' and not by `s' 1999-09-19 David Martin <dmartina@usa.net> * gtkedit/editcmd.c (edit_print_string): Use unsigned char so that 8 bit chars from strftime get displayed when inserting date. * lib/mc.ext.in: Add entries for bzip2 compressed pages as used in Mandrake 6.0. The generic entry for bzip2 moved to the end of the file to avoid interferences. In this one I changed the extension check to a type check (as used for gzip) which might give problems in some systems. * configure.in: Use -Tlatin1 to format man pages when available and "view" 8 bit chars. 1999-09-19 Norbert Warmuth <nwarmuth@privat.circular.de> * gtkedit/edit.h: Include files reordered in order to make it compile with --with-debug * gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width dependent on lenght of translated strings to display. * src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch] to mad.[ch] * src/option.c: Include files reordered in order to make it compile with --with-debug * src/mad.c (mad_init): New function. Initialize debug FILE pointer to stderr (moved to a function because not on every system stderr is a constant). (mad_set_debug): added const qualifier * src/main.c (main): call mad_init * po/*.po: s/defination/definition/ * gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir != $srcdir. * vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier. * vfs/mcserv.c: removed definition of mad_strconcat which is also in mad.c.
1999-09-20 03:09:07 +04:00
dnl Check if nroff accepts -Tlatin1 or -Tascii
1998-02-27 07:54:42 +03:00
dnl
if $HAVE_nroff; then
AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
1998-02-27 07:54:42 +03:00
AC_CACHE_VAL(ac_cv_nroff_tascii, [
1999-09-19 Andrew V. Samoilov <sav@bcs.zp.ua> * src/user.c (check_patterns): char* is used instead of char [] in sizeof * src/util.c (string_perm): prefix named pipes by 'p' and not by `s' 1999-09-19 David Martin <dmartina@usa.net> * gtkedit/editcmd.c (edit_print_string): Use unsigned char so that 8 bit chars from strftime get displayed when inserting date. * lib/mc.ext.in: Add entries for bzip2 compressed pages as used in Mandrake 6.0. The generic entry for bzip2 moved to the end of the file to avoid interferences. In this one I changed the extension check to a type check (as used for gzip) which might give problems in some systems. * configure.in: Use -Tlatin1 to format man pages when available and "view" 8 bit chars. 1999-09-19 Norbert Warmuth <nwarmuth@privat.circular.de> * gtkedit/edit.h: Include files reordered in order to make it compile with --with-debug * gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width dependent on lenght of translated strings to display. * src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch] to mad.[ch] * src/option.c: Include files reordered in order to make it compile with --with-debug * src/mad.c (mad_init): New function. Initialize debug FILE pointer to stderr (moved to a function because not on every system stderr is a constant). (mad_set_debug): added const qualifier * src/main.c (main): call mad_init * po/*.po: s/defination/definition/ * gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir != $srcdir. * vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier. * vfs/mcserv.c: removed definition of mad_strconcat which is also in mad.c.
1999-09-20 03:09:07 +04:00
nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
1998-02-27 07:54:42 +03:00
if test $? = 0
then
1999-09-19 Andrew V. Samoilov <sav@bcs.zp.ua> * src/user.c (check_patterns): char* is used instead of char [] in sizeof * src/util.c (string_perm): prefix named pipes by 'p' and not by `s' 1999-09-19 David Martin <dmartina@usa.net> * gtkedit/editcmd.c (edit_print_string): Use unsigned char so that 8 bit chars from strftime get displayed when inserting date. * lib/mc.ext.in: Add entries for bzip2 compressed pages as used in Mandrake 6.0. The generic entry for bzip2 moved to the end of the file to avoid interferences. In this one I changed the extension check to a type check (as used for gzip) which might give problems in some systems. * configure.in: Use -Tlatin1 to format man pages when available and "view" 8 bit chars. 1999-09-19 Norbert Warmuth <nwarmuth@privat.circular.de> * gtkedit/edit.h: Include files reordered in order to make it compile with --with-debug * gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width dependent on lenght of translated strings to display. * src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch] to mad.[ch] * src/option.c: Include files reordered in order to make it compile with --with-debug * src/mad.c (mad_init): New function. Initialize debug FILE pointer to stderr (moved to a function because not on every system stderr is a constant). (mad_set_debug): added const qualifier * src/main.c (main): call mad_init * po/*.po: s/defination/definition/ * gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir != $srcdir. * vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier. * vfs/mcserv.c: removed definition of mad_strconcat which is also in mad.c.
1999-09-20 03:09:07 +04:00
ac_cv_nroff_tascii=" -Tlatin1"
1998-02-27 07:54:42 +03:00
else
1999-09-19 Andrew V. Samoilov <sav@bcs.zp.ua> * src/user.c (check_patterns): char* is used instead of char [] in sizeof * src/util.c (string_perm): prefix named pipes by 'p' and not by `s' 1999-09-19 David Martin <dmartina@usa.net> * gtkedit/editcmd.c (edit_print_string): Use unsigned char so that 8 bit chars from strftime get displayed when inserting date. * lib/mc.ext.in: Add entries for bzip2 compressed pages as used in Mandrake 6.0. The generic entry for bzip2 moved to the end of the file to avoid interferences. In this one I changed the extension check to a type check (as used for gzip) which might give problems in some systems. * configure.in: Use -Tlatin1 to format man pages when available and "view" 8 bit chars. 1999-09-19 Norbert Warmuth <nwarmuth@privat.circular.de> * gtkedit/edit.h: Include files reordered in order to make it compile with --with-debug * gtkedit/editcmd.c (menu_save_mode_cmd): calculate dialog width dependent on lenght of translated strings to display. * src/mad.c, mad.h, util.c, util.h: Move mad-functions from util.[ch] to mad.[ch] * src/option.c: Include files reordered in order to make it compile with --with-debug * src/mad.c (mad_init): New function. Initialize debug FILE pointer to stderr (moved to a function because not on every system stderr is a constant). (mad_set_debug): added const qualifier * src/main.c (main): call mad_init * po/*.po: s/defination/definition/ * gnome/Makefile.in ($(MAGICDEV_GENERATED)): Make it compile with $buildir != $srcdir. * vfs/ftpfs.c (ftpfs_set_debug), vfs.h: added const qualifier. * vfs/mcserv.c: removed definition of mad_strconcat which is also in mad.c.
1999-09-20 03:09:07 +04:00
nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
if test $? = 0
then
ac_cv_nroff_tascii=" -Tascii"
else
ac_cv_nroff_tascii=""
fi
1998-02-27 07:54:42 +03:00
fi
])
if test "x$ac_cv_nroff_tascii" = x; then
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes,$ac_cv_nroff_tascii])
fi
1998-02-27 07:54:42 +03:00
fi
TROFFASCII="$ac_cv_nroff_tascii"
AC_SUBST(TROFFASCII)
dnl
dnl Check for - option to file
dnl
AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
if $HAVE_FILECMD; then
AC_MSG_CHECKING([for - option to file command])
AC_CACHE_VAL(ac_cv_filestdin, [[
cat > conftest.c <<\EOF
1998-02-27 07:54:42 +03:00
/* A comment */
#if 0
#endif
void main(void)
{ return; }
EOF
cat > conftest.sed <<\EOF
s/^[^:]*:[ ]*//
s/[ ]*$//
1998-02-27 07:54:42 +03:00
EOF
filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
if test "x$filehyphen_1" = "x$filehyphen_2"; then
1998-02-27 07:54:42 +03:00
ac_cv_filestdin=yes
else
ac_cv_filestdin=no
fi
rm conftest.c conftest.sed
]])
1998-02-27 07:54:42 +03:00
if test x$ac_cv_filestdin = xyes; then
AC_DEFINE(FILE_STDIN, 1,
[Define if the file command accepts - for stdin])
1998-02-27 07:54:42 +03:00
fi
filestdin=$ac_cv_filestdin
AC_MSG_RESULT([$filestdin])
1998-02-27 07:54:42 +03:00
dnl
dnl Check for -L option to file
dnl
AC_MSG_CHECKING([for -L option to file command])
1998-02-27 07:54:42 +03:00
AC_CACHE_VAL(ac_cv_filel, [
file -L . > /dev/null 2>&1
if test $? = 0
then
ac_cv_filel=yes
else
ac_cv_filel=no
fi
])
if test x$ac_cv_filel = xyes; then
AC_DEFINE(FILE_L, 1, [Define if the file command accepts the -L option])
1998-02-27 07:54:42 +03:00
fi
filel=$ac_cv_filel
AC_MSG_RESULT([$filel])
1998-02-27 07:54:42 +03:00
fi
AC_MSG_CHECKING([for subshell support])
1998-02-27 07:54:42 +03:00
AC_ARG_WITH(subshell,
[--with-subshell If you want to use a concurrent shell],
[result=no
1998-02-27 07:54:42 +03:00
if test x$withval = xoptional
then
AC_DEFINE(SUBSHELL_OPTIONAL, 1,
[Define to make subshell support optional])
AC_DEFINE(HAVE_SUBSHELL_SUPPORT, 1,
[Define to enable subshell support])
1998-02-27 07:54:42 +03:00
result="optional"
fi
if test x$withval = xyes
then
AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
result="yes"
fi],
[dnl Default: provide the subshell support on non-ultrix machines
case $host_os in
ultrix*)
1998-02-27 07:54:42 +03:00
result=no
;;
*)
1998-02-27 07:54:42 +03:00
AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
result=yes
;;
esac
])
AC_MSG_RESULT([$result])
1998-02-27 07:54:42 +03:00
subshell="$result"
dnl
dnl Memory Allocation Debugger
1998-02-27 07:54:42 +03:00
dnl
mem_debug="none"
AC_ARG_WITH(mad,
[--with-mad Developers only: activates MAD (memory debugger)],
1998-02-27 07:54:42 +03:00
[if test x$withval = xyes; then
mem_debug="Janne's MAD library"
AC_DEFINE(HAVE_MAD, 1,
[Define to use Memory Allocation Debugger (MAD)])
AC_MSG_NOTICE([compiling with memory leak detector])
1998-02-27 07:54:42 +03:00
fi])
dnl
dnl Electric Fence - another memory debugger
1998-02-27 07:54:42 +03:00
dnl
AC_ARG_WITH(efence,
[--with-efence Developers only: activates Electric Fence],
1998-02-27 07:54:42 +03:00
[if test x$withval = xyes; then
LIBS="$LIBS -lefence"
AC_MSG_NOTICE([compiling with Electric fence])
1998-02-27 07:54:42 +03:00
mem_debug="Electric Fence"
fi])
dnl
dnl To force mmap support
dnl We use only part of the functionality of mmap, so on AIX,
dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
dnl
AC_ARG_WITH(mmap,
[--with-mmap To force using the mmap call (AIX)],
[if test x$withval = xyes; then
AC_DEFINE(HAVE_MMAP)
AC_MSG_NOTICE([forcing MMAP support])
1998-02-27 07:54:42 +03:00
fi])
slang_check_lib=true
slang_term=""
slang_use_system_installed_lib=false
AC_CHECK_LIB(slang,SLang_init_tty,
[AC_CHECK_HEADERS(slang.h)
1998-02-27 07:54:42 +03:00
if test x$ac_cv_header_slang_h = xyes
then
slang_use_system_installed_lib=true
slang_check_lib=false
else
AC_CHECK_HEADERS(slang/slang.h)
if test x$ac_cv_header_slang_slang_h = xyes
then
slang_use_system_installed_lib=true
slang_check_lib=false
fi
fi
])
1998-02-27 07:54:42 +03:00
AC_ARG_WITH(terminfo,
[--with-terminfo SLANG: Force usage of terminfo],[
if test x$withval = xyes; then
AC_USE_TERMINFO
slang_check_lib=false
slang_use_system_installed_lib=false
fi]
1998-02-27 07:54:42 +03:00
)
AC_ARG_WITH(termcap,
[--with-termcap SLANG: Force usage of termcap],[
if test x$withval = xyes; then
AC_USE_TERMCAP
slang_check_lib=false
slang_use_system_installed_lib=false
fi]
1998-02-27 07:54:42 +03:00
)
I improved the movement keys of the internal viewer a little bit. Now in wrap mode the End key and cursor up key behave much better (e.g. when viewing binary files with lots of wrapped lines). It's not perfekt but it's better than it used to be. Tue Apr 28 06:52:24 1998 Norbert Warmuth <k3190@fh-sw.de> * gnome/gcmd.c (gnome_open_terminal): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...) Tue Apr 28 06:06:03 1998 Norbert Warmuth <k3190@fh-sw.de> * vfs/extfs.c (extfs_open, extfs_close): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...), this fixes the broken copyin and copyout in 4.1.32. Tue Apr 28 06:11:08 1998 Norbert Warmuth <k3190@fh-sw.de> * view.c (toggle_wrap_mode, toggle_hex_mode): Force recalculation of bottom_first (we mustn't use an already calculated and cached value because it is invalid for the new mode and the End key would not move to the end of the file). * configure.in: Renamed the option `--with-our-slang' to `--with-included-slang' (this one looks better because we also have an `--with-included-gettext'). Make the option `--with-ext2undel' recognice a given path. * cmd.c (view_file_at_line): In plain view (F13) set the default magic flag to zero in order to view the file content unprocessed (esp. don't uncompress files if they are compressed). The view_simple_cmd got broken when the default magic flag in view.c was changed from 0 to 1. * view.c (do_view_init, goto_line): Set wrap mode temporary off to make goto line number work, i.e. `line number' now always means line number in file and not line number on screen (in wrap mode one long line wrapped once is displayed in two lines on the screen). That's important when the viewer is invoked from the find file dialog to display even in wrap mode approxiamtly the part of the file where we found the content we searched for. (move_forward2): In wrap mode lines were sometimes counted wrong causing cursor up to move more than one line. (move_backward2): Fixed the movement in wrap mode. (change_viewer): Always re-init viewer when we have a filename, i. e. if the viewer is invoked with simple_view_cmd then we can switch with the F8 key between unprocessed file content und uncompressed file content. (view_init): re-init view also when magic flag was altered
1998-04-28 18:19:48 +04:00
AC_ARG_WITH(included-slang,
[--with-included-slang SLANG: use the SLang library included here],[
if test x$withval = xyes; then
1998-02-27 07:54:42 +03:00
slang_use_system_installed_lib=false
slang_check_lib=true
fi]
1998-02-27 07:54:42 +03:00
)
AC_ARG_WITH(slang,
[--with-slang Compile with the slang screen manager],[
if test x$withval = xyes; then
AC_WITH_SLANG
fi
])
LIBEDIT_A=""
MCEDIT=""
LEDIT=""
EDIT_msg=""
AC_ARG_WITH(edit,
[--with-edit Enable internal editpr],
[if test x$withval = xyes
1998-02-27 07:54:42 +03:00
then
AC_WITH_EDIT
else
EDIT_msg="no"
fi],
[dnl Default: provide the internal editor
1998-02-27 07:54:42 +03:00
AC_WITH_EDIT
])
1998-02-27 07:54:42 +03:00
AC_SUBST(LIBEDIT_A)
AC_SUBST(MCEDIT)
AC_SUBST(LEDIT)
AC_ARG_WITH(netrc,
[--with-netrc Compile with ftp .netrc support],[
if test x$withval = xyes; then
AC_DEFINE(USE_NETRC, 1,
[Define to use .netrc for FTP connections])
AC_MSG_NOTICE([ftpfs will use .netrc])
fi
1998-02-27 07:54:42 +03:00
])
undelfs_o=""
if test $use_vfs = yes; then
AC_ARG_WITH(ext2undel,
1998-02-27 07:54:42 +03:00
[--with-ext2undel Compile with ext2 undelete code],[
I improved the movement keys of the internal viewer a little bit. Now in wrap mode the End key and cursor up key behave much better (e.g. when viewing binary files with lots of wrapped lines). It's not perfekt but it's better than it used to be. Tue Apr 28 06:52:24 1998 Norbert Warmuth <k3190@fh-sw.de> * gnome/gcmd.c (gnome_open_terminal): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...) Tue Apr 28 06:06:03 1998 Norbert Warmuth <k3190@fh-sw.de> * vfs/extfs.c (extfs_open, extfs_close): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...), this fixes the broken copyin and copyout in 4.1.32. Tue Apr 28 06:11:08 1998 Norbert Warmuth <k3190@fh-sw.de> * view.c (toggle_wrap_mode, toggle_hex_mode): Force recalculation of bottom_first (we mustn't use an already calculated and cached value because it is invalid for the new mode and the End key would not move to the end of the file). * configure.in: Renamed the option `--with-our-slang' to `--with-included-slang' (this one looks better because we also have an `--with-included-gettext'). Make the option `--with-ext2undel' recognice a given path. * cmd.c (view_file_at_line): In plain view (F13) set the default magic flag to zero in order to view the file content unprocessed (esp. don't uncompress files if they are compressed). The view_simple_cmd got broken when the default magic flag in view.c was changed from 0 to 1. * view.c (do_view_init, goto_line): Set wrap mode temporary off to make goto line number work, i.e. `line number' now always means line number in file and not line number on screen (in wrap mode one long line wrapped once is displayed in two lines on the screen). That's important when the viewer is invoked from the find file dialog to display even in wrap mode approxiamtly the part of the file where we found the content we searched for. (move_forward2): In wrap mode lines were sometimes counted wrong causing cursor up to move more than one line. (move_backward2): Fixed the movement in wrap mode. (change_viewer): Always re-init viewer when we have a filename, i. e. if the viewer is invoked with simple_view_cmd then we can switch with the F8 key between unprocessed file content und uncompressed file content. (view_init): re-init view also when magic flag was altered
1998-04-28 18:19:48 +04:00
if test x$withval != xno;
1998-02-27 07:54:42 +03:00
then
I improved the movement keys of the internal viewer a little bit. Now in wrap mode the End key and cursor up key behave much better (e.g. when viewing binary files with lots of wrapped lines). It's not perfekt but it's better than it used to be. Tue Apr 28 06:52:24 1998 Norbert Warmuth <k3190@fh-sw.de> * gnome/gcmd.c (gnome_open_terminal): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...) Tue Apr 28 06:06:03 1998 Norbert Warmuth <k3190@fh-sw.de> * vfs/extfs.c (extfs_open, extfs_close): Changed my_system(1,...) to my_system(EXECUTE_AS_SHELL,...), this fixes the broken copyin and copyout in 4.1.32. Tue Apr 28 06:11:08 1998 Norbert Warmuth <k3190@fh-sw.de> * view.c (toggle_wrap_mode, toggle_hex_mode): Force recalculation of bottom_first (we mustn't use an already calculated and cached value because it is invalid for the new mode and the End key would not move to the end of the file). * configure.in: Renamed the option `--with-our-slang' to `--with-included-slang' (this one looks better because we also have an `--with-included-gettext'). Make the option `--with-ext2undel' recognice a given path. * cmd.c (view_file_at_line): In plain view (F13) set the default magic flag to zero in order to view the file content unprocessed (esp. don't uncompress files if they are compressed). The view_simple_cmd got broken when the default magic flag in view.c was changed from 0 to 1. * view.c (do_view_init, goto_line): Set wrap mode temporary off to make goto line number work, i.e. `line number' now always means line number in file and not line number on screen (in wrap mode one long line wrapped once is displayed in two lines on the screen). That's important when the viewer is invoked from the find file dialog to display even in wrap mode approxiamtly the part of the file where we found the content we searched for. (move_forward2): In wrap mode lines were sometimes counted wrong causing cursor up to move more than one line. (move_backward2): Fixed the movement in wrap mode. (change_viewer): Always re-init viewer when we have a filename, i. e. if the viewer is invoked with simple_view_cmd then we can switch with the F8 key between unprocessed file content und uncompressed file content. (view_init): re-init view also when magic flag was altered
1998-04-28 18:19:48 +04:00
if test x$withval != xyes
then
LIBS="$LIBS -L$withval/lib"
CPPFLAGS="$CPPFLAGS -I$withval/include"
fi
1998-02-27 07:54:42 +03:00
AC_EXT2_UNDEL
fi],[
1998-02-27 07:54:42 +03:00
dnl Default: detect
AC_CHECK_LIB(ext2fs, ext2fs_close, [AC_EXT2_UNDEL], , [-lcom_err])
])
fi
1998-02-27 07:54:42 +03:00
AC_SUBST(undelfs_o)
if $search_ncurses
then
AC_MSG_NOTICE([checking location of ncurses.h file])
1998-02-27 07:54:42 +03:00
AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
1998-04-11 06:53:35 +04:00
AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
1998-02-27 07:54:42 +03:00
1998-04-11 06:53:35 +04:00
AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
1998-02-27 07:54:42 +03:00
AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
fi
Rerun configure when you have problems with missing slang.h. Sun Jan 31 20:04:13 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/vfs.c (vfs_strip_suffix_from_filename): Whoever replaces every occurance of 0 with NULL should stop this stupidy. And replacing '\0' with NULL is plain wrong!!. Reverted this replacement. * vfs/ftpfs.c (load_no_proxy_list): ditto Fri Jan 29 22:55:56 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * slang/slang.h: renamed to slang-mc.h * slang/Makefile.in: delete slang.h on "make clean" * configure.in: link slang/slang-mc.h to slang/slang.h when the included slang is used. Problem was that MC's slang.h was used when we compiled with an already installed SLang and the systems header file were included with <slang/slang.h>. Unfortunatly I can't use AC_LINK_FILES to make the links because if we needn't make any links AC_LINK_FILES makes a link from srcdir to top_builddir (builddir != srcdir). Temporary add $LGPM to $LIBS when checking for the resizeterm and keyok functions (ncurses might be linked against GPM). Substitude PACKAGE (intl/Makefile makes use of it) Sun Jan 31 19:42:47 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * gnome/Makefile.in (install_mx): make it work with srcdir != builddir (gmc.gnorba is located in $srcdir) * src/hotlist.c (add_new_entry_input, add_new_group_input): Make the quick_widget arrays static and various changes needed because they are now static. add_widgets_i18n recalculates button positions which get lost when the quick_widget arrays are non static. * src/screen.c (to_buffer): nul terminate string when using strncpy * src/setup.c: Save and restore new option ftpfs_first_cd_then_ls. Sun Jan 31 19:57:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * vfs/ftpfs.c (insert_dot): New function. Insert a "." into the linked list. Stat'ing the root directory of a ftpfs fails if the dot is missing. (retrieve_dir): insert "." into the linked list if the ftp server haven't send it. Sun Jan 31 19:50:24 1999 Norbert Warmuth <nwarmuth@privat.circular.de> * The following changes make ftpfs work with a remote AmiTCP server are the result of somehow longish EMail debugging session. I don't know any public server of this kind but I was told the combination Unix/Amiga boxes are often used in intranets. * vfs/ftpfs.c (translate_path): New function. Translate a Unix path, i.e. MC's internal path representation (e.g. /somedir/somefile) to a path valid for the remote server. Every path transfered to the remote server has to be mangled by this function right prior to sending it. Currently only Amiga ftp servers are handled in a special manner. * vfs/ftpfs.c (various places): use translate_path * vfs/ftpfs.c (login_server): Assume we have to mangle pathnames if the greatings string from the server contains the word Amiga. If this assumption is wrong I have to find another way to turn on path translation. * vfs/ftpfs.c (ftpfs_get_current_directory): Prepend a leading slash if it is missing. MC needs it as seperator between hostname and path in its internal url representation.
1999-01-31 23:28:13 +03:00
dnl Ncurses specific checks
dnl
dnl If ncurses exports the ESCDELAY variable it should be set to 0
dnl or you'll have to press Esc three times to dismiss a dialog box.
dnl
if test -n "$ncurses_version"; then
save_LIBS="$LIBS"
LIBS="$MCLIBS $LIBS"
AC_CACHE_CHECK([for ESCDELAY variable],
[mc_cv_ncurses_escdelay],
[AC_TRY_COMPILE([], [
extern int ESCDELAY;
int main ()
{
ESCDELAY = 0;
}
],
[mc_cv_ncurses_escdelay=yes],
[mc_cv_ncurses_escdelay=no]
)
])
if test "$mc_cv_ncurses_escdelay" = yes; then
AC_DEFINE(HAVE_ESCDELAY, 1,
[Define if ncurses has ESCDELAY variable])
fi
AC_CHECK_FUNCS(resizeterm)
LIBS="$save_LIBS"
fi
1998-02-27 07:54:42 +03:00
if test "x$screen_manager" = "xunknown"; then
AC_WITH_SLANG
fi
dnl
dnl The variables used for expanding the auto saver.
dnl
cons_saver=""
1998-02-27 07:54:42 +03:00
install_saver="no"
PAMLIBS=""
case $host_os in
linux*)
cons_saver="cons.saver"
1998-02-27 07:54:42 +03:00
install_saver="yes"
dnl
dnl On Linux, check for PAM authentication available
dnl
AC_CHECK_LIB(pam, pam_start, [
AC_DEFINE(HAVE_PAM, 1,
[Define if PAM (Pluggable Authentication Modules) is available])
1998-02-27 07:54:42 +03:00
PAMLIBS="-lpam -ldl"
],[],[-ldl])
;;
esac
AC_SUBST(cons_saver)
1998-02-27 07:54:42 +03:00
AC_SUBST(PAMLIBS)
dnl
dnl User visible support for charset conversion.
dnl
AC_ARG_ENABLE([charset],
[--enable-charset Support for charset selection and conversion])
have_charset=
if test "x$enable_charset" = xyes; then
if test -z "$am_cv_func_iconv"; then
AC_MSG_WARN([Cannot enable charset support because iconv function is missing])
else
AC_DEFINE(HAVE_CHARSET, 1,
[Define to enable charset selection and conversion])
have_charset=yes
fi
fi
1998-02-27 07:54:42 +03:00
dnl
dnl This code should be moved to the ac_WITH_SLANG
dnl
dnl We check for the existance of setupterm on curses library
dnl this is required to load certain definitions on some termcaps
dnl editions (AIX and OSF/1 I seem to remember).
dnl Note that we avoid using setupterm
case $screen_manager in
SLang*)
case $host_os in
linux*)
;;
*)
AC_CHECK_LIB(curses,setupterm,
[AC_TRY_COMPILE([
1998-02-27 07:54:42 +03:00
#include <curses.h>
#include <term.h>],[
if (key_end == parm_insert_line)
return 1;
return 0;
],
[MCLIBS="$MCLIBS -lcurses"
AC_DEFINE(USE_SETUPTERM, 1,
[Define to use function `setupterm'
from `curses' library in S-Lang])])
])
esac
;;
1998-02-27 07:54:42 +03:00
esac
LIBS="$LIBS $posix_libs"
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
if test "x$SAMBAFILES" != x; then
AC_CONFIG_SUBDIRS([vfs/samba])
fi
AM_CONDITIONAL(USE_EDIT, [test -n "$LIBEDIT_A"])
AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes])
AM_CONDITIONAL(USE_VFS_NET, [test -n "$NETFILES"])
AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$undelfs_o"])
AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$SAMBAFILES"])
AM_CONDITIONAL(MCSERV_INSTALL,
[test "x$enable_mcserv_install$mcserv" = xyesmcserv])
AM_CONDITIONAL(INCLUDED_SLANG,
[test "x$slang_use_system_installed_lib" = xfalse])
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
AH_BOTTOM([#include <extraconf.h>])
AC_CONFIG_FILES([
Makefile
mc.spec
doc/Makefile
vfs/Makefile:vfs/Make-mc.in
vfs/extfs/Makefile
lib/Makefile
src/Makefile
slang/Makefile
edit/Makefile
1999-03-21 05:10:04 +03:00
syntax/Makefile
pc/Makefile
lib/mc.ext
lib/mc.sh
lib/mc.csh
mcfn_install
vfs/extfs/deb
vfs/extfs/ftplist
vfs/extfs/lslR
vfs/extfs/uar
vfs/extfs/ucpio
vfs/extfs/ulha
vfs/extfs/uha
vfs/extfs/urar
vfs/extfs/uzoo
doc/mc.1 doc/mcedit.1 doc/mcserv.8
intl/Makefile po/Makefile.in
])
AC_CONFIG_COMMANDS(potfiles,
[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
AC_OUTPUT
1998-02-27 07:54:42 +03:00
case $screen_manager in
SLang*)
screen_manager="${screen_manager}${slang_term}" ;;
esac
1998-02-27 07:54:42 +03:00
echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
1998-02-27 07:54:42 +03:00
Compiler flags: ${CFLAGS}
File system: ${vfs_type}
${vfs_flags}
Screen manager: ${screen_manager}
1998-02-27 07:54:42 +03:00
Install console saver: ${install_saver}
Mouse support: ${mouse_lib}
X11 events support: ${textmode_x11_support}
1998-02-27 07:54:42 +03:00
Debugger code: ${mem_debug}
With subshell support: ${subshell}
Internal editor: ${EDIT_msg}
Install path: ${prefix}/bin, ${prefix}/lib/mc
"