1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
|
|
|
dnl Configure.in file for the Midnight Commander
|
|
|
|
dnl
|
2000-09-16 03:57:10 +04:00
|
|
|
|
2002-08-21 19:22:06 +04:00
|
|
|
AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
|
|
|
|
AC_PREREQ(2.52)
|
|
|
|
AC_CONFIG_SRCDIR(src/main.c)
|
|
|
|
AC_CONFIG_AUX_DIR(config)
|
2004-12-03 08:45:21 +03:00
|
|
|
AM_INIT_AUTOMAKE(mc, 4.6.1a)
|
2001-09-12 23:18:38 +04:00
|
|
|
|
2000-08-24 18:13:00 +04:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2000-09-12 23:31:56 +04:00
|
|
|
AM_MAINTAINER_MODE
|
2000-08-24 18:13:00 +04:00
|
|
|
|
2001-09-12 23:18:38 +04:00
|
|
|
AC_CANONICAL_HOST
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
AC_AIX
|
|
|
|
AC_MINIX
|
|
|
|
AC_ISC_POSIX
|
2001-08-25 07:14:20 +04:00
|
|
|
|
2001-09-07 08:25:02 +04:00
|
|
|
AC_PROG_CC_STDC
|
2001-08-25 07:14:20 +04:00
|
|
|
|
2002-08-23 19:56:51 +04:00
|
|
|
dnl
|
2002-11-15 20:37:53 +03:00
|
|
|
dnl First try glib 2.x. If it's not found, use glib 1.2.x.
|
|
|
|
dnl Keep this check close to the beginning, so that the users
|
|
|
|
dnl without any glib won't have their time wasted by other checks.
|
2002-08-23 19:56:51 +04:00
|
|
|
dnl
|
2002-08-23 23:44:50 +04:00
|
|
|
|
2003-02-23 00:15:50 +03:00
|
|
|
AC_ARG_WITH(glib12,
|
|
|
|
[ --with-glib12 Force using glib 1.2.x [[no]]])
|
|
|
|
|
2003-03-07 21:10:37 +03:00
|
|
|
AC_ARG_WITH([glib_static],
|
|
|
|
[ --with-glib-static Link glib statically [[no]]])
|
|
|
|
|
2003-02-23 00:15:50 +03:00
|
|
|
glib_found=no
|
|
|
|
if test "x$with_glib12" != "xyes"; then
|
|
|
|
PKG_CHECK_MODULES(GLIB, [glib-2.0], [glib_found=yes], [:])
|
|
|
|
fi
|
2002-11-15 20:37:53 +03:00
|
|
|
|
|
|
|
dnl Fall back to glib-1.2, don't use pkgconfig to find it.
|
2003-02-23 00:15:50 +03:00
|
|
|
if test "x$glib_found" != "xyes" ; then
|
2002-09-17 17:47:19 +04:00
|
|
|
dnl This temporary variable is a workaround for a bug in Autoconf-2.53
|
|
|
|
glib_path=$PATH:/usr/local/bin
|
2002-08-23 23:44:50 +04:00
|
|
|
|
2002-09-17 17:47:19 +04:00
|
|
|
dnl Klugde for FreeBSD, where glib-config is renamed to glib12-config.
|
|
|
|
AC_PATH_PROGS([GLIB_CONFIG], [glib-config glib12-config],,[$glib_path])
|
2002-08-23 23:44:50 +04:00
|
|
|
|
2002-09-17 17:47:19 +04:00
|
|
|
AC_ARG_VAR([GLIB_CONFIG], [Path to glib-config (version 1.2.x only)])
|
2003-02-23 00:15:50 +03:00
|
|
|
AM_PATH_GLIB(1.2.6, , [AC_MSG_ERROR([Test for glib failed.
|
2002-09-17 17:47:19 +04:00
|
|
|
GNU Midnight Commander requires glib 1.2.6 or above.])])
|
2003-02-23 07:38:24 +03:00
|
|
|
dnl Save GLIB_CFLAGS and GLIB_LIBS, since the following call to
|
|
|
|
dnl AM_PATH_GLIB will overwrite them.
|
|
|
|
save_GLIB_CFLAGS="$GLIB_CFLAGS"
|
|
|
|
save_GLIB_LIBS="$GLIB_LIBS"
|
|
|
|
dnl Check for gmodule. Store the flags necessary to compile and
|
|
|
|
dnl link programs using gmodule functionality in GMODULE_CFLAGS
|
|
|
|
dnl and GMODULE_LIBS.
|
|
|
|
AM_PATH_GLIB(1.2.6, [gmodule_found=yes], , [gmodule])
|
|
|
|
GMODULE_CFLAGS="$GLIB_CFLAGS"
|
|
|
|
GMODULE_LIBS="$GLIB_LIBS"
|
|
|
|
GLIB_CFLAGS="$save_GLIB_CFLAGS"
|
|
|
|
GLIB_LIBS="$save_GLIB_LIBS"
|
2003-03-07 21:10:37 +03:00
|
|
|
GLIB_LIBDIR="`$GLIB_CONFIG --exec-prefix`/lib"
|
2003-09-23 00:27:44 +04:00
|
|
|
|
|
|
|
dnl Used in src/glibcompat.c
|
|
|
|
AC_CHECK_FUNCS([strlcpy])
|
2003-02-23 07:38:24 +03:00
|
|
|
else
|
|
|
|
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule_found=yes])
|
2003-03-07 21:10:37 +03:00
|
|
|
GLIB_LIBDIR="`$PKG_CONFIG --variable=libdir glib-2.0`"
|
2002-09-17 17:47:19 +04:00
|
|
|
fi
|
2002-08-23 19:56:51 +04:00
|
|
|
|
2003-02-23 07:38:24 +03:00
|
|
|
if test "x$gmodule_found" = "xyes" ; then
|
|
|
|
dnl Check if the gmodule functionality supported on this system.
|
|
|
|
AC_G_MODULE_SUPPORTED
|
|
|
|
fi
|
2002-08-23 19:56:51 +04:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_HEADER_MAJOR
|
|
|
|
AC_C_CONST
|
2001-09-07 08:25:02 +04:00
|
|
|
AC_SYS_LARGEFILE
|
2001-06-26 03:52:47 +04:00
|
|
|
|
2002-08-23 19:56:51 +04:00
|
|
|
AC_PROG_LN_S
|
2001-03-15 04:18:14 +03:00
|
|
|
AC_CHECK_TOOL(AR, ar, ar)
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2001-09-13 02:10:37 +04: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
|
|
|
|
2001-10-25 07:46:59 +04:00
|
|
|
dnl
|
|
|
|
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
|
|
|
|
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
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_ARG_WITH(mmap,
|
|
|
|
[ --with-mmap Use the mmap call [[yes if found]]])
|
|
|
|
if test x$with_mmap != xno; then
|
|
|
|
if test x$with_mmap = x; then
|
|
|
|
AC_FUNC_MMAP
|
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_MMAP, 1)
|
|
|
|
fi
|
|
|
|
fi
|
2001-10-25 07:46:59 +04:00
|
|
|
|
2001-06-29 12:09:37 +04:00
|
|
|
dnl
|
|
|
|
dnl Internationalization
|
|
|
|
dnl
|
2003-03-12 03:10:23 +03:00
|
|
|
MC_ASM_LABELS
|
2001-06-29 12:09:37 +04:00
|
|
|
AM_GNU_GETTEXT
|
2002-09-14 03:09:22 +04:00
|
|
|
AM_GNU_GETTEXT_VERSION(0.11.5)
|
|
|
|
|
2001-06-29 12:09:37 +04:00
|
|
|
if test "x$USE_INCLUDED_LIBINTL" = xyes; then
|
2001-09-10 23:31:14 +04:00
|
|
|
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
|
2001-06-29 12:09:37 +04:00
|
|
|
fi
|
|
|
|
|
2002-11-29 03:46:09 +03:00
|
|
|
dnl Determine which help translations we want to install.
|
2003-09-23 01:04:59 +04:00
|
|
|
ALL_DOC_LINGUAS="es hu it pl ru sr"
|
2002-11-29 03:46:09 +03:00
|
|
|
|
|
|
|
DOC_LINGUAS=
|
|
|
|
if test "x$USE_NLS" = xyes; then
|
2003-02-20 21:35:32 +03:00
|
|
|
if test -z "$LINGUAS"; then
|
|
|
|
langs="`grep -v '^#' $srcdir/po/LINGUAS`"
|
|
|
|
else
|
|
|
|
langs="$LINGUAS"
|
|
|
|
fi
|
2002-11-29 03:46:09 +03:00
|
|
|
else
|
|
|
|
langs=
|
|
|
|
fi
|
|
|
|
|
|
|
|
for h_lang in $ALL_DOC_LINGUAS; do
|
|
|
|
for lang in $langs; do
|
|
|
|
if test "$lang" = "$h_lang"; then
|
|
|
|
DOC_LINGUAS="$DOC_LINGUAS $lang"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
AC_SUBST(DOC_LINGUAS)
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
2001-05-27 00:36:24 +04:00
|
|
|
dnl OS specific flags.
|
1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
2001-01-13 09:55:24 +03:00
|
|
|
case $host_os in
|
|
|
|
aux*)
|
2001-05-27 00:36:24 +04:00
|
|
|
# A/UX
|
2003-01-25 00:14:33 +03:00
|
|
|
LIBS="$LIBS -lposix"
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_DEFINE(_POSIX_SOURCE)
|
2001-05-27 00:36:24 +04:00
|
|
|
;;
|
2004-09-04 02:37:52 +04:00
|
|
|
linux*)
|
2004-09-25 19:18:10 +04:00
|
|
|
AC_DEFINE(_GNU_SOURCE,, [Define to request GNU feature set on Linux])
|
2004-09-04 02:37:52 +04:00
|
|
|
;;
|
2001-01-13 09:55:24 +03:00
|
|
|
esac
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2003-01-25 00:14:33 +03:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_PROG_INSTALL
|
2002-11-17 01:56:50 +03:00
|
|
|
AC_CHECK_HEADERS([unistd.h string.h memory.h grp.h limits.h malloc.h \
|
|
|
|
stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h sys/time.h \
|
2004-08-17 04:53:03 +04:00
|
|
|
sys/timeb.h sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
|
2005-01-28 01:42:55 +03:00
|
|
|
security/pam_misc.h sys/socket.h sys/sysmacros.h sys/types.h \
|
|
|
|
sys/mkdev.h])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2001-02-20 19:29:23 +03:00
|
|
|
AC_HEADER_TIME
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
|
|
|
dnl Missing structure components
|
2003-10-29 20:36:16 +03:00
|
|
|
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_STRUCT_ST_BLOCKS
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Check availability of some functions
|
|
|
|
dnl
|
|
|
|
|
2004-08-09 13:35:40 +04:00
|
|
|
AC_CHECK_FUNCS([atoll cfgetospeed getsid initgroups memcpy memmove memset \
|
2003-10-29 11:15:32 +03:00
|
|
|
putenv setreuid setuid statfs strerror strftime \
|
2005-01-30 08:06:13 +03:00
|
|
|
sysconf tcgetattr tcsetattr truncate getgrouplist])
|
2003-10-29 11:15:32 +03:00
|
|
|
|
|
|
|
dnl S-Lang needs all four functions to be defined to use POSIX signal API
|
|
|
|
AC_CHECK_FUNCS([sigaction sigemptyset sigprocmask sigaddset], , [slang_signals=no])
|
|
|
|
if test x$slang_signals != xno; then
|
|
|
|
AC_DEFINE(SLANG_POSIX_SIGNALS, 1, [Define to use POSIX signal API in S-Lang])
|
|
|
|
fi
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1999-05-17 09:51:44 +04:00
|
|
|
dnl
|
|
|
|
dnl getpt is a GNU Extension (glibc 2.1.x)
|
|
|
|
dnl
|
2003-07-22 03:29:29 +04:00
|
|
|
AC_CHECK_FUNCS(posix_openpt, , [AC_CHECK_FUNCS(getpt)])
|
2000-09-16 03:57:10 +04: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
|
2001-01-11 21:57:44 +03:00
|
|
|
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
|
|
|
|
], [
|
2001-05-29 07:00:02 +04:00
|
|
|
AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
2001-01-11 21:57:44 +03:00
|
|
|
], [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
|
1998-03-23 20:49:04 +03:00
|
|
|
AC_CHECK_TYPE(nlink_t, unsigned int)
|
2004-11-03 00:54:58 +03:00
|
|
|
AC_CHECK_TYPES([socklen_t],
|
|
|
|
AC_DEFINE([HAVE_C_TYPE_SOCKLEN_T], [1], [Define to 1 if socklen_t is defined by <sys/socket.h>]),,
|
|
|
|
[#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-11-11 04:57:43 +03:00
|
|
|
dnl This is needed for regex.c only
|
|
|
|
AC_CHECK_TYPE(uintptr_t,
|
|
|
|
[AC_DEFINE(HAVE_UINTPTR_T, 1,
|
|
|
|
[Define if you have the `uintptr_t' type.])
|
|
|
|
])
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_FUNC_ALLOCA
|
2001-09-11 05:42:08 +04:00
|
|
|
AC_FUNC_STRCOLL
|
1998-02-27 07:54:42 +03:00
|
|
|
|
1999-04-21 23:18:31 +04:00
|
|
|
dnl
|
2001-08-25 07:14:20 +04:00
|
|
|
dnl X11 support.
|
2002-12-23 20:02:04 +03:00
|
|
|
dnl Used to read keyboard modifiers when running under X11.
|
1999-04-21 23:18:31 +04:00
|
|
|
dnl
|
|
|
|
|
2002-12-23 20:02:04 +03:00
|
|
|
AC_PATH_XTRA
|
2002-12-26 23:05:58 +03:00
|
|
|
if test "x$no_x" = xyes; then
|
2002-12-23 20:02:04 +03:00
|
|
|
textmode_x11_support="no"
|
|
|
|
else
|
|
|
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
2003-02-23 07:38:24 +03:00
|
|
|
if test "x$mc_cv_g_module_supported" = "xyes" ; then
|
|
|
|
dnl Replace the contents of GLIB_CFLAGS and GLIB_LIBS with those of
|
|
|
|
dnl GMODULE_CFLAGS and GMODULE_LIBS, only if X is available and gmodule
|
|
|
|
dnl functionality is supported on the system. This way, mc will be
|
|
|
|
dnl linked against the gmodule library only when it's really required.
|
|
|
|
GLIB_CFLAGS="$GMODULE_CFLAGS"
|
|
|
|
GLIB_LIBS="$GMODULE_LIBS"
|
|
|
|
else
|
|
|
|
MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
|
|
|
fi
|
2002-12-23 20:02:04 +03:00
|
|
|
AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT, 1,
|
|
|
|
[Define to enable getting events from X Window System])
|
|
|
|
textmode_x11_support="yes"
|
|
|
|
fi
|
1999-04-21 23:18:31 +04:00
|
|
|
|
2003-03-07 21:10:37 +03:00
|
|
|
dnl
|
|
|
|
dnl Try to find static libraries for glib and gmodule.
|
|
|
|
dnl
|
|
|
|
if test x$with_glib_static = xyes; then
|
|
|
|
new_GLIB_LIBS=
|
|
|
|
for i in $GLIB_LIBS; do
|
|
|
|
case x$i in
|
|
|
|
x-lglib*)
|
|
|
|
lib=glib ;;
|
|
|
|
x-lgmodule*)
|
|
|
|
lib=gmodule ;;
|
|
|
|
*)
|
|
|
|
lib=
|
|
|
|
add="$i" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if test -n "$lib"; then
|
|
|
|
lib1=`echo $i | sed 's/^-l//'`
|
|
|
|
if test -f "$GLIB_LIBDIR/lib${lib1}.a"; then
|
|
|
|
add="$GLIB_LIBDIR/lib${lib1}.a"
|
|
|
|
else
|
|
|
|
if test -f "$GLIB_LIBDIR/lib${lib}.a"; then
|
|
|
|
add="$GLIB_LIBDIR/lib${lib}.a"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Cannot find static $lib])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
new_GLIB_LIBS="$new_GLIB_LIBS $add"
|
|
|
|
done
|
|
|
|
GLIB_LIBS="$new_GLIB_LIBS"
|
|
|
|
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
|
2001-01-11 21:57:44 +03:00
|
|
|
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
|
2001-09-13 23:40:40 +04:00
|
|
|
AC_CHECK_LIB([$lib], [gethostbyname],
|
|
|
|
[LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
|
1998-02-27 07:54:42 +03:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Sequent wants getprocessstats
|
|
|
|
dnl
|
|
|
|
AC_CHECK_LIB(seq, get_process_stats, [
|
|
|
|
LIBS="$LIBS -lseq"
|
2001-09-11 04:27:03 +04:00
|
|
|
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
|
|
|
|
2001-08-25 07:14:20 +04:00
|
|
|
MC_VFS_CHECKS
|
2001-04-20 03:20:06 +04:00
|
|
|
|
1999-03-29 09:06:50 +04:00
|
|
|
vfs_type="normal"
|
2002-09-13 10:01:41 +04:00
|
|
|
if test x$use_vfs = xyes; then
|
2001-09-13 00:45:46 +04:00
|
|
|
AC_MSG_NOTICE([enabling VFS code])
|
1999-03-29 09:06:50 +04:00
|
|
|
vfs_type="Midnight Commander Virtual File System"
|
|
|
|
fi
|
|
|
|
|
2002-09-30 05:25:58 +04:00
|
|
|
dnl
|
|
|
|
dnl Check for gpm mouse support (Linux only)
|
|
|
|
dnl
|
1998-02-27 07:54:42 +03:00
|
|
|
mouse_lib="xterm only"
|
2002-09-30 05:25:58 +04:00
|
|
|
AC_ARG_WITH(gpm-mouse,
|
|
|
|
[ --with-gpm-mouse Compile with gpm mouse support (Linux only)
|
|
|
|
[[yes if found]]])
|
|
|
|
|
2001-01-13 09:55:24 +03:00
|
|
|
case $host_os in
|
|
|
|
linux*)
|
2002-09-30 05:25:58 +04:00
|
|
|
if test x$with_gpm_mouse != xno; then
|
|
|
|
AC_CHECK_LIB(gpm, Gpm_Repeat,
|
|
|
|
[AC_DEFINE(HAVE_LIBGPM, 1,
|
|
|
|
[Define to enable gpm mouse support on Linux])
|
|
|
|
mouse_lib="gpm and xterm"
|
|
|
|
MCLIBS="$MCLIBS -lgpm"],
|
|
|
|
[AC_MSG_WARN([libgpm is missing or older than 0.18])
|
2001-01-13 09:55:24 +03:00
|
|
|
])
|
2002-09-30 05:25:58 +04:00
|
|
|
fi
|
2001-01-13 09:55:24 +03:00
|
|
|
;;
|
|
|
|
esac
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
dnl
|
2002-10-30 05:37:48 +03:00
|
|
|
dnl Check nroff and the options it supports
|
1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
|
|
|
AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
|
2002-10-30 05:37:48 +03:00
|
|
|
|
|
|
|
dnl Default values
|
|
|
|
MANDOC=-man
|
|
|
|
MAN_FLAGS=
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
if $HAVE_nroff; then
|
2001-01-11 21:57:44 +03:00
|
|
|
AC_MSG_CHECKING([for manual formatting macros])
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_CACHE_VAL(mc_cv_mandoc, [
|
2001-10-18 08:54:42 +04:00
|
|
|
nroff -mandoc < /dev/null > /dev/null 2>&1
|
2002-10-30 05:37:48 +03:00
|
|
|
if test $? = 0; then
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_mandoc=-mandoc
|
1998-02-27 07:54:42 +03:00
|
|
|
else
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_mandoc=-man
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
|
|
|
])
|
2003-10-29 22:23:16 +03:00
|
|
|
MANDOC=$mc_cv_mandoc
|
2001-09-13 00:45:46 +04:00
|
|
|
AC_MSG_RESULT([$MANDOC])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-10-30 05:37:48 +03:00
|
|
|
AC_MSG_CHECKING([for option to disable ANSI color in manuals])
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_CACHE_VAL(mc_cv_man_nocolor, [
|
2002-10-30 05:37:48 +03:00
|
|
|
nroff -c < /dev/null > /dev/null 2>&1
|
|
|
|
if test $? = 0; then
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_man_nocolor=-c
|
2002-10-30 05:37:48 +03:00
|
|
|
else
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_man_nocolor=
|
2002-10-30 05:37:48 +03:00
|
|
|
fi
|
|
|
|
])
|
2003-10-29 22:23:16 +03:00
|
|
|
MAN_FLAGS=$mc_cv_man_nocolor
|
2002-10-30 05:37:48 +03:00
|
|
|
AC_MSG_RESULT([${MAN_NOCOLOR-none}])
|
|
|
|
|
2001-01-11 21:57:44 +03:00
|
|
|
AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_CACHE_VAL(mc_cv_nroff_tascii, [
|
|
|
|
mc_cv_nroff_tascii=
|
1999-09-20 03:09:07 +04:00
|
|
|
nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
|
2002-10-30 05:37:48 +03:00
|
|
|
if test $? = 0; then
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_nroff_tascii=-Tlatin1
|
1998-02-27 07:54:42 +03:00
|
|
|
else
|
1999-09-20 03:09:07 +04:00
|
|
|
nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
|
2002-10-30 05:37:48 +03:00
|
|
|
if test $? = 0; then
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_nroff_tascii=-Tascii
|
1999-09-20 03:09:07 +04:00
|
|
|
fi
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
|
|
|
])
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_MSG_RESULT([${mc_cv_nroff_tascii-no}])
|
|
|
|
MAN_FLAGS="$MAN_FLAGS $mc_cv_nroff_tascii"
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
2002-10-30 05:37:48 +03:00
|
|
|
|
|
|
|
AC_SUBST(MANDOC)
|
|
|
|
AC_SUBST(MAN_FLAGS)
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
dnl
|
2003-10-29 04:25:42 +03:00
|
|
|
dnl Check for -L option to file
|
1998-02-27 07:54:42 +03:00
|
|
|
dnl
|
|
|
|
AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
|
|
|
|
if $HAVE_FILECMD; then
|
2003-10-29 04:25:42 +03:00
|
|
|
AC_MSG_CHECKING([for -L option to file command])
|
2003-10-29 22:23:16 +03:00
|
|
|
AC_CACHE_VAL(mc_cv_filel, [
|
2003-10-29 04:25:42 +03:00
|
|
|
file -L . > /dev/null 2>&1
|
|
|
|
if test $? = 0; then
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_filel=yes
|
1998-02-27 07:54:42 +03:00
|
|
|
else
|
2003-10-29 22:23:16 +03:00
|
|
|
mc_cv_filel=no
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
2003-10-29 04:25:42 +03:00
|
|
|
])
|
2003-10-29 22:23:16 +03:00
|
|
|
if test x$mc_cv_filel = xyes; then
|
2003-10-29 04:25:42 +03:00
|
|
|
AC_DEFINE(FILE_L, 1, [Define if the file command accepts the -L option])
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
2003-10-29 22:23:16 +03:00
|
|
|
filel=$mc_cv_filel
|
2003-10-29 04:25:42 +03:00
|
|
|
AC_MSG_RESULT([$filel])
|
1998-02-27 07:54:42 +03:00
|
|
|
fi
|
|
|
|
|
2002-08-04 10:49:03 +04:00
|
|
|
|
2001-01-11 21:57:44 +03:00
|
|
|
AC_MSG_CHECKING([for subshell support])
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_ARG_WITH(subshell,
|
2002-09-13 01:03:04 +04:00
|
|
|
[ --with-subshell Compile in concurrent subshell [[yes]]
|
|
|
|
--with-subshell=optional Don't run concurrent shell by default [[no]]],
|
2001-01-11 21:57:44 +03:00
|
|
|
[result=no
|
1998-02-27 07:54:42 +03:00
|
|
|
if test x$withval = xoptional
|
|
|
|
then
|
2001-09-11 04:27:03 +04:00
|
|
|
AC_DEFINE(SUBSHELL_OPTIONAL, 1,
|
|
|
|
[Define to make subshell support optional])
|
1998-02-27 07:54:42 +03:00
|
|
|
result="optional"
|
|
|
|
fi
|
|
|
|
if test x$withval = xyes
|
|
|
|
then
|
|
|
|
result="yes"
|
2001-01-11 21:57:44 +03:00
|
|
|
fi],
|
2002-08-19 09:17:34 +04:00
|
|
|
[dnl Default: enable the subshell support
|
|
|
|
result="yes"
|
2001-01-11 21:57:44 +03:00
|
|
|
])
|
2002-08-04 10:49:03 +04:00
|
|
|
if test "x$result" != xno; then
|
|
|
|
AC_DEFINE(HAVE_SUBSHELL_SUPPORT, 1,
|
|
|
|
[Define to enable subshell support])
|
|
|
|
fi
|
2001-01-11 21:57:44 +03:00
|
|
|
AC_MSG_RESULT([$result])
|
1998-02-27 07:54:42 +03:00
|
|
|
subshell="$result"
|
|
|
|
|
|
|
|
|
2002-09-30 05:02:02 +04:00
|
|
|
dnl
|
|
|
|
dnl Select the screen library. mcslang is the included S-Lang library.
|
|
|
|
dnl
|
|
|
|
AC_ARG_WITH(screen,
|
|
|
|
[ --with-screen=LIB Compile with screen library: slang, mcslang or
|
|
|
|
ncurses [[slang if found, else mcslang]]])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-09-30 05:02:02 +04:00
|
|
|
case x$with_screen in
|
|
|
|
xslang)
|
|
|
|
MC_WITH_SLANG(strict)
|
|
|
|
;;
|
|
|
|
xmcslang)
|
|
|
|
MC_WITH_MCSLANG
|
|
|
|
;;
|
|
|
|
xncurses)
|
|
|
|
MC_WITH_NCURSES
|
|
|
|
;;
|
|
|
|
x)
|
|
|
|
MC_WITH_SLANG
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([Value of the screen library is incorrect])
|
|
|
|
;;
|
|
|
|
esac
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-09-30 05:02:02 +04:00
|
|
|
|
|
|
|
dnl
|
2002-10-08 08:42:10 +04:00
|
|
|
dnl Force using termcap. This option is processed in MC_WITH_MCSLANG.
|
|
|
|
dnl Report an error if this option is not applicable.
|
2002-09-30 05:02:02 +04:00
|
|
|
dnl
|
2002-09-13 01:03:04 +04:00
|
|
|
AC_ARG_WITH(termcap,
|
2002-10-08 08:42:10 +04:00
|
|
|
[ --with-termcap Try using termcap database [[only if no terminfo]]],
|
|
|
|
[if test x$with_screen != xmcslang; then
|
2002-09-30 05:02:02 +04:00
|
|
|
AC_MSG_ERROR([Option `--with-termcap' only works with `--with-screen=mcslang'])
|
|
|
|
fi
|
|
|
|
])
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-09-13 10:39:06 +04:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Internal editor support.
|
|
|
|
dnl
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_ARG_WITH(edit,
|
2002-09-13 10:39:06 +04:00
|
|
|
[ --with-edit Enable internal editor [[yes]]])
|
|
|
|
|
|
|
|
if test x$with_edit != xno; then
|
|
|
|
AC_DEFINE(USE_INTERNAL_EDIT, 1, [Define to enable internal editor])
|
|
|
|
use_edit=yes
|
2002-10-01 02:10:29 +04:00
|
|
|
edit_msg="yes"
|
2002-09-13 10:39:06 +04:00
|
|
|
AC_MSG_NOTICE([using internal editor])
|
|
|
|
else
|
2002-10-01 02:10:29 +04:00
|
|
|
edit_msg="no"
|
2002-09-13 10:39:06 +04:00
|
|
|
fi
|
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2002-11-17 01:56:50 +03:00
|
|
|
dnl Check if the OS is supported by the console saver.
|
2001-01-13 10:24:13 +03:00
|
|
|
cons_saver=""
|
2001-01-13 09:55:24 +03:00
|
|
|
case $host_os in
|
|
|
|
linux*)
|
2002-11-17 01:56:50 +03:00
|
|
|
cons_saver=yes
|
2001-01-13 09:55:24 +03:00
|
|
|
esac
|
2002-11-17 01:56:50 +03:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
|
2003-10-26 02:25:51 +04:00
|
|
|
dnl Support for background operations
|
|
|
|
AC_ARG_ENABLE([background],
|
|
|
|
[ --enable-background Support for background file operations [[yes]]])
|
|
|
|
if test "x$enable_background" != xno; then
|
2003-10-26 02:48:30 +03:00
|
|
|
AC_DEFINE(WITH_BACKGROUND, 1, [Define to enable background file operations])
|
2003-10-26 02:25:51 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2001-05-31 04:53:06 +04:00
|
|
|
dnl
|
|
|
|
dnl User visible support for charset conversion.
|
|
|
|
dnl
|
|
|
|
AC_ARG_ENABLE([charset],
|
2002-09-13 01:03:04 +04:00
|
|
|
[ --enable-charset Support for charset selection and conversion [[no]]])
|
2001-05-31 04:53:06 +04:00
|
|
|
have_charset=
|
2004-11-03 23:53:16 +03:00
|
|
|
charset_msg="no"
|
2001-05-31 04:53:06 +04:00
|
|
|
if test "x$enable_charset" = xyes; then
|
2002-08-26 02:17:07 +04:00
|
|
|
if test "x$am_cv_func_iconv" != xyes; then
|
2004-11-03 23:53:16 +03:00
|
|
|
AC_MSG_WARN([Cannot enable charset support because iconv function is missing])
|
2001-05-31 04:53:06 +04:00
|
|
|
else
|
|
|
|
AC_DEFINE(HAVE_CHARSET, 1,
|
|
|
|
[Define to enable charset selection and conversion])
|
|
|
|
have_charset=yes
|
2004-11-03 23:10:54 +03:00
|
|
|
charset_msg="yes"
|
2001-05-31 04:53:06 +04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2002-03-26 16:55:42 +03:00
|
|
|
if test "$GLIBC21" != yes; then
|
|
|
|
AC_DEFINE(USE_INCLUDED_REGEX, 1, [Use the regex included here])
|
|
|
|
fi
|
2001-05-31 04:53:06 +04:00
|
|
|
|
2004-08-17 14:15:45 +04:00
|
|
|
if test x"$USE_MAINTAINER_MODE" = x"yes"; then
|
|
|
|
if test x"${enable_gcc_warnings+set}" != x"set"; then
|
2004-10-24 18:48:01 +04:00
|
|
|
if test x"${GCC}" = x"yes"; then
|
|
|
|
CFLAGS="-Wall $CFLAGS"
|
|
|
|
fi
|
2004-08-17 14:15:45 +04:00
|
|
|
fi
|
2005-04-13 22:39:15 +04:00
|
|
|
else
|
|
|
|
CPPFLAGS="-DNDEBUG ${CPPFLAGS}"
|
2004-08-17 14:15:45 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
ri_GCC_WARNINGS
|
2004-08-17 12:53:30 +04:00
|
|
|
|
1998-02-27 07:54:42 +03:00
|
|
|
AC_SUBST(CFLAGS)
|
|
|
|
AC_SUBST(CPPFLAGS)
|
|
|
|
AC_SUBST(LDFLAGS)
|
|
|
|
AC_SUBST(LIBS)
|
|
|
|
|
2002-09-05 09:43:10 +04:00
|
|
|
dnl Libraries used only when building the mc binary
|
|
|
|
AC_SUBST(MCLIBS)
|
|
|
|
|
2002-08-21 19:22:06 +04:00
|
|
|
dnl Version for the RedHat package, without dashes
|
2002-10-09 00:44:58 +04:00
|
|
|
RPM_VERSION=`echo $VERSION | sed 's/-//g'`
|
2002-10-09 01:13:45 +04:00
|
|
|
AC_SUBST(RPM_VERSION)
|
2002-08-21 19:22:06 +04:00
|
|
|
|
2002-09-13 10:21:54 +04:00
|
|
|
if test -n "$use_smbfs"; then
|
2001-02-07 19:41:16 +03:00
|
|
|
AC_CONFIG_SUBDIRS([vfs/samba])
|
2001-09-07 08:25:02 +04:00
|
|
|
fi
|
1999-06-22 23:56:36 +04:00
|
|
|
|
2002-09-13 10:39:06 +04:00
|
|
|
AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])
|
2001-09-11 00:31:35 +04:00
|
|
|
AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes])
|
2002-09-06 05:19:02 +04:00
|
|
|
AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue])
|
2002-09-13 10:55:24 +04:00
|
|
|
AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$use_undelfs"])
|
2002-09-13 10:21:54 +04:00
|
|
|
AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"])
|
2002-09-13 10:01:41 +04:00
|
|
|
AM_CONDITIONAL(USE_MCFS, [test -n "$use_mcfs"])
|
2002-09-30 05:02:02 +04:00
|
|
|
AM_CONDITIONAL(INCLUDED_SLANG, [test "x$with_screen" = xmcslang])
|
2001-08-26 21:15:02 +04:00
|
|
|
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
|
|
|
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
2001-03-15 04:18:14 +03:00
|
|
|
|
2001-09-13 00:45:46 +04:00
|
|
|
AC_CONFIG_FILES([
|
1998-03-25 08:16:00 +03:00
|
|
|
Makefile
|
1999-02-28 05:52:05 +03:00
|
|
|
mc.spec
|
2004-09-28 15:48:57 +04:00
|
|
|
mc.qpg
|
1998-03-25 08:16:00 +03:00
|
|
|
doc/Makefile
|
2001-12-31 11:10:46 +03:00
|
|
|
vfs/Makefile
|
2000-09-02 01:34:26 +04:00
|
|
|
vfs/extfs/Makefile
|
1998-03-25 08:16:00 +03:00
|
|
|
lib/Makefile
|
|
|
|
src/Makefile
|
|
|
|
slang/Makefile
|
|
|
|
edit/Makefile
|
1999-03-21 05:10:04 +03:00
|
|
|
syntax/Makefile
|
2002-09-17 20:13:25 +04:00
|
|
|
m4/Makefile
|
1998-03-25 08:16:00 +03:00
|
|
|
lib/mc.ext
|
2002-12-11 23:55:37 +03:00
|
|
|
vfs/extfs/a
|
|
|
|
vfs/extfs/apt
|
2002-12-11 22:27:05 +03:00
|
|
|
vfs/extfs/audio
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/deb
|
2002-12-11 23:55:37 +03:00
|
|
|
vfs/extfs/deba
|
|
|
|
vfs/extfs/debd
|
|
|
|
vfs/extfs/dpkg
|
2003-04-29 20:05:12 +04:00
|
|
|
vfs/extfs/iso9660
|
2002-12-14 05:47:30 +03:00
|
|
|
vfs/extfs/hp48
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/lslR
|
2002-12-11 23:55:37 +03:00
|
|
|
vfs/extfs/mailfs
|
|
|
|
vfs/extfs/patchfs
|
|
|
|
vfs/extfs/rpms
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/uar
|
2002-12-14 05:47:30 +03:00
|
|
|
vfs/extfs/uarj
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/uha
|
2002-12-11 23:55:37 +03:00
|
|
|
vfs/extfs/ulha
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/urar
|
2002-11-29 01:59:43 +03:00
|
|
|
vfs/extfs/uzip
|
2001-03-08 03:30:47 +03:00
|
|
|
vfs/extfs/uzoo
|
1998-03-25 08:16:00 +03:00
|
|
|
|
2003-01-19 19:49:38 +03:00
|
|
|
doc/mc.1 doc/mcedit.1 doc/mcview.1 doc/mcserv.8
|
2002-08-10 01:09:51 +04:00
|
|
|
doc/es/mc.1 doc/es/Makefile
|
2002-10-18 04:06:58 +04:00
|
|
|
doc/hu/mc.1 doc/hu/Makefile
|
2002-08-20 05:58:41 +04:00
|
|
|
doc/it/mc.1 doc/it/Makefile
|
2002-08-25 11:52:17 +04:00
|
|
|
doc/pl/mc.1 doc/pl/Makefile
|
2002-08-14 10:18:48 +04:00
|
|
|
doc/ru/mc.1 doc/ru/Makefile
|
2003-09-23 01:04:59 +04:00
|
|
|
doc/sr/mc.1 doc/sr/mcserv.8 doc/sr/Makefile
|
1998-03-25 08:16:00 +03:00
|
|
|
|
2002-09-17 20:13:25 +04:00
|
|
|
intl/Makefile
|
|
|
|
po/Makefile.in
|
2001-09-13 00:45:46 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|
1998-02-27 07:54:42 +03:00
|
|
|
|
|
|
|
echo "
|
|
|
|
Configuration:
|
|
|
|
|
|
|
|
Source code location: ${srcdir}
|
2001-08-25 07:14:20 +04:00
|
|
|
Compiler: ${CC}
|
1998-02-27 07:54:42 +03:00
|
|
|
Compiler flags: ${CFLAGS}
|
|
|
|
File system: ${vfs_type}
|
2001-08-25 07:14:20 +04:00
|
|
|
${vfs_flags}
|
2002-09-30 05:02:02 +04:00
|
|
|
Screen library: ${screen_msg}
|
2001-08-25 07:14:20 +04:00
|
|
|
Mouse support: ${mouse_lib}
|
|
|
|
X11 events support: ${textmode_x11_support}
|
1998-02-27 07:54:42 +03:00
|
|
|
With subshell support: ${subshell}
|
2002-10-01 02:10:29 +04:00
|
|
|
Internal editor: ${edit_msg}
|
2004-11-03 23:10:54 +03:00
|
|
|
Support for charset: ${charset_msg}
|
2000-08-22 06:17:58 +04:00
|
|
|
"
|