2 dnl Configure.in file for the Midnight Commander
5 AC_CONFIG_HEADER(config.h)
9 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
10 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
13 top_srcdir=`dirname $0`
18 dnl This is path where we're looking for headers in addition to /usr/include
19 dnl and whatever cpp defaults to.
20 include_additional_path="/usr/local/include /usr/contrib/include /opt/gnu/include"
22 dnl This sets/resets compiling with -g by default. It should be set to yes for
23 dnl development versions and set to no for release versions.
26 dnl We want autoconf to check whether -g is available
27 dnl We reset it back soon.
37 if test x"$AWK" = x; then
44 # test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4)
45 if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then
51 AC_SUBST(AWK_VAR_OPTION)
61 AC_PATH_PROG(MV, mv, mv)
62 AC_PATH_PROG(CP, cp, cp)
63 AC_PATH_PROG(RM, rm, rm)
64 AC_PATH_PROG(CHMOD, chmod, :)
65 AC_PATH_PROG(AR, ar, ar)
67 AC_CHECK_PROG(system,uname,`uname`,unknown)
68 AC_CHECK_PROGS(X11_WWW,netscape arena Mosaic chimera)
69 if test x"$X11_WWW" = x; then
73 ALL_LINGUAS="ca cs da de el es es_ES fi fr hu it ja ko nl no pl pt_BR ro ru sv wa zh_TW.Big5"
75 dnl ultra ulgy hack to get MKINSTALLDIRS right
78 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
81 dnl This part supplies reasonable defaults for CFLAGS, if they weren't
82 dnl specified by ''CFLAGS=flags ./configure''
85 if test x$GCC = xyes; then
86 if test x$ac_cv_prog_gcc_g = xyes; then
93 dnl Debug mode is turned ON for now
94 if test "x$CCOPTS" = x; then
98 if test "x$CCOPTS" = x; then
99 if test x$GCC = xyes; then
100 if test x$system = xLinux; then
101 CCOPTS='-O2 -fno-strength-reduce'
102 if test x$use_cc_g_flag = xyes; then
103 if test $cc_uses_g = yes; then
109 if test x$use_cc_g_flag = xyes; then
110 if test $cc_uses_g = yes; then
116 if test x$use_cc_g_flag = xyes; then
129 AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(Test for GLIB failed. MC requires GLIB.))
130 LIBS="$LIBS $GLIB_LIBS"
131 CFLAGS="$CFLAGS $GLIB_CFLAGS"
134 dnl For A/UX. Do not move
138 if test $system = A/UX
141 AC_DEFINE(_POSIX_SOURCE)
145 AC_CHECK_HEADERS(unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h)
146 AC_CHECK_HEADERS(stdlib.h termios.h utime.h fcntl.h sys/statfs.h)
148 if test x$ac_cv_header_malloc_h = xno; then
149 echo '/* NeXTStep malloc.h stub */' > $srcdir/malloc.h
158 #Let me check for an incompatible regcomp in HP-UX before making this
164 dnl Missing structure components
170 dnl Check availability of some functions
173 AC_CHECK_FUNCS(strerror statfs getwd strcasecmp strncasecmp)
174 AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv)
175 AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed)
176 AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset)
177 AC_CHECK_FUNCS(sysconf setuid setreuid)
180 dnl getpt is a GNU Extension (glibc 2.1.x)
182 AC_CHECK_FUNCS(getpt)
185 if test x$system = xLinux; then
186 AC_CHECK_LIB(shadow,pw_encrypt,[
188 AC_CHECK_HEADERS(shadow.h)
189 if test x$ac_cv_header_shadow_h = xyes; then
192 AC_CHECK_HEADERS(shadow/shadow.h)
193 if test x$ac_cv_shadow_shadow_h = xyes; then
197 if test $shadow_header = yes; then
198 AC_DEFINE(LINUX_SHADOW)
205 NEED_CRYPT_PROTOTYPE=yes
206 if test x$ac_cv_header_crypt_h = xyes; then
207 AC_TRY_WARNINGS([#include <crypt.h>], [char *p = crypt("xxx", "yyy");],[
208 NEED_CRYPT_PROTOTYPE=no])
210 if test x$ac_cv_header_unistd_h = xyes; then
211 AC_TRY_WARNINGS([#include <unistd.h>], [char *p = crypt("xxx", "yyy");],[
212 NEED_CRYPT_PROTOTYPE=no])
215 if test x$NEED_CRYPT_PROTOTYPE=xyes; then
216 AC_DEFINE(NEED_CRYPT_PROTOTYPE)
220 dnl AIX and Sequent need <sys/select.h> for fd_set
222 AC_CHECK_HEADERS(sys/select.h)
225 dnl On SCO and some SVR4, crypt is on libcrypt.a
226 dnl grantpt in libpt.a
229 AC_CHECK_FUNCS(crypt, , [
230 AC_CHECK_LIB(crypt, crypt, LCRYPT="-lcrypt",[
231 AC_CHECK_LIB(crypt_i, crypt, LCRYPT="-lcrypt_i")])])
234 dnl This is the correct version
235 dnl AC_CHECK_FUNCS(grantpt, , AC_CHECK_LIB(pt, grantpt))
237 dnl And workaround for a Autoconf 2.4 bug:
238 AC_CHECK_FUNCS(grantpt)
239 if test x$ac_cv_func_grantpt = xyes; then
242 AC_CHECK_LIB(pt, grantpt)
246 dnl libintl.a required on SCO to provide proper NLS support
247 dnl (using native cc links it by default)
249 if test x$GCC = xyes; then
250 AC_CHECK_LIB(intl, tolower)
253 dnl replacing lstat with statlstat on sco makes it more portable between
255 AC_CHECK_FUNCS(statlstat)
258 dnl If running under AIX, AC_AIX does not tell us that
260 AC_MSG_CHECKING(for AIX defines)
262 [#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
268 ], AC_MSG_RESULT(no))
271 dnl This hack is here until autoconf adds it
272 dnl Needed for Unixware: getmntent is on libgen.a
274 AC_CHECK_LIB(gen, getmntent, [LIBS="-lgen $LIBS"])
277 dnl This is from GNU fileutils, check aclocal.m4 for more information
282 dnl Missing typedefs and replacements
286 AC_CHECK_TYPE(umode_t, int)
287 AC_CHECK_TYPE(off_t, long)
290 AC_CHECK_TYPE(nlink_t, unsigned int)
296 dnl Cool hack, but we don't use it currently
298 dnl AC_MSG_CHECKING(for token pasting method)
299 dnl AC_EGREP_CPP(portable,[
300 dnl #define tken(a, b) a##b
302 dnl ], [AC_DEFINE(HAVE_PORTABLE_TOKEN_PASTING)
303 dnl AC_MSG_RESULT(portable)
305 dnl AC_MSG_RESULT(non-portable)
311 dnl X11 support in the textmode edition.
314 dnl These variables are only used when building the text edition MC binary
320 textmode_x11_support="no"
321 AC_ARG_WITH(tm-x-support,
322 [--with-tm-x-support Add X Window System support to the text edition],
323 if test x$withval = xyes; then
325 MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
326 AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT)
327 textmode_x11_support="yes"
332 dnl Network related functions
335 AC_CHECK_LIB(nsl, t_accept)
336 AC_CHECK_LIB(socket, socket)
339 AC_CHECK_FUNCS(socket, have_socket=yes)
340 if test $have_socket = no; then
341 # socket is not in the default libraries. See if it's in some other.
342 for lib in bsd socket inet; do
343 AC_CHECK_LIB($lib, socket, [
346 AC_DEFINE(HAVE_SOCKET)
351 have_gethostbyname=no
352 AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
353 if test $have_gethostbyname = no; then
354 # gethostbyname is not in the default libraries. See if it's in some other.
355 for lib in bsd socket inet; do
356 AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
360 AC_CHECK_FUNCS(socketpair)
363 dnl Sequent wants getprocessstats
365 AC_CHECK_LIB(seq, get_process_stats, [
367 AC_DEFINE(HAVE_GET_PROCESS_STATS)])
371 if test $have_socket = yes; then
372 NETFILES="\$(NETFILES)"
380 if test $use_vfs = yes
384 fastdepvfs=fastdepvfs
385 MCCPPFLAGS="$MCCPPFLAGS -I\$(vfsdir)"
386 AC_MSG_RESULT(Using the VFS switch code)
387 vfs_type="Midnight Commander Virtual File System"
393 screen_manager=unknown
397 LDFLAGS=${LDFLAGS--O}
399 AC_DEFUN(AC_USE_SUNOS_CURSES, [
401 screen_manager="SunOS 4.x /usr/5include curses"
402 AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
403 AC_DEFINE(USE_SUNOS_CURSES)
404 AC_DEFINE(NO_COLOR_CURSES)
405 AC_DEFINE(USE_SYSV_CURSES)
406 CPPFLAGS="$CPPFLAGS -I/usr/5include"
407 XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
408 AC_MSG_RESULT(Please note that some screen refreshs may fail)
409 AC_WARN(Reconsider using Slang)
412 AC_DEFUN(AC_USE_OSF1_CURSES, [
413 AC_MSG_RESULT(Using OSF1 curses)
415 screen_manager="OSF1 curses"
416 AC_DEFINE(NO_COLOR_CURSES)
417 AC_DEFINE(USE_SYSV_CURSES)
419 LIBS="$LIBS -lcurses"
422 AC_DEFUN(AC_USE_SYSV_CURSES, [
423 AC_MSG_RESULT(Using SysV curses)
424 AC_DEFINE(USE_SYSV_CURSES)
427 screen_manager="SysV/curses"
428 LIBS="$LIBS -lcurses"
434 dnl AC_ARG_WITH(bsd-curses,
435 dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy],
436 dnl search_ncurses=false
437 dnl screen_manager="Ultrix/cursesX"
438 dnl if test $system = ULTRIX
440 dnl THIS_CURSES=cursesX
442 dnl THIS_CURSES=curses
445 dnl LIBS="$LIBS -l$THIS_CURSES -ltermcap"
446 dnl AC_DEFINE(USE_BSD_CURSES)
447 dnl XCURSES="xcurses.o"
448 dnl AC_MSG_RESULT(Please note that some screen refreshs may fail)
449 dnl AC_WARN(Use of the bsdcurses extension has some)
450 dnl AC_WARN(display/input problems.)
451 dnl AC_WARN(Reconsider using xcurses)
455 [--with-sco Use this to turn on SCO-specific code],[
456 if test x$withval = xyes; then
457 AC_DEFINE(SCO_FLAVOR)
458 CFLAGS="$CFLAGS -D_SVID3"
462 AC_ARG_WITH(sunos-curses,
463 [--with-sunos-curses Used to force SunOS 4.x curses],[
464 if test x$withval = xyes; then
469 AC_ARG_WITH(osf1-curses,
470 [--with-osf1-curses Used to force OSF/1 curses],[
471 if test x$withval = xyes; then
477 [--with-vcurses[=incdir] Used to force SysV curses],
478 if test x$withval = xyes; then
481 CPPFLAGS="$CPPFLAGS -I$withval"
486 mouse_lib="xterm only"
488 AC_ARG_WITH(gpm-mouse,
489 [--with-gpm-mouse[=base-dir] Compile with gpm mouse support],[
490 if test x$withval != xno
492 if test x$withval != xyes
494 LIBS="$LIBS -L$withval/lib"
495 CPPFLAGS="$CPPFLAGS -I$withval/include"
497 AC_DEFINE(HAVE_LIBGPM)
498 mouse_lib="GPM and xterm"
502 AC_CHECK_LIB(gpm, Gpm_Repeat,[
503 AC_DEFINE(HAVE_LIBGPM)
504 mouse_lib="GPM and xterm"
506 if test $system = Linux
508 AC_MSG_WARN("libgpm.a is missing or older than 0.18")
516 [--with-ncurses[=base-dir] Compile with ncurses/locate base dir],
517 if test x$withval = xyes
521 LIBS="$LIBS -L$withval/lib -lncurses"
522 CPPFLAGS="$CPPFLAGS -I$withval/include"
524 screen_manager="ncurses"
525 AC_DEFINE(USE_NCURSES)
530 [--with-hsc Compile with support for the HSC firewall],
531 if test x$withval = xyes; then
547 libgtkedit="libgtkedit.a"
548 insticons=install_icons
549 if test x"$xvers" = xnone; then
554 gnomeicondir=`gnome-config --datadir`/pixmaps
556 AC_SUBST(gnomeicondir)
560 AC_SUBST(GNOMEGNORBA_LIBS)
563 dnl Check for the -mandoc package
565 AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
567 AC_MSG_CHECKING(for manual formatting macros)
568 AC_CACHE_VAL(ac_cv_mandoc, [
569 nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null
578 AC_MSG_RESULT($MANDOC)
585 dnl Check if nroff accepts -Tlatin1 or -Tascii
588 AC_MSG_CHECKING(if nroff accepts -Tlatin1 or -Tascii)
589 AC_CACHE_VAL(ac_cv_nroff_tascii, [
590 nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
593 ac_cv_nroff_tascii=" -Tlatin1"
596 nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
599 ac_cv_nroff_tascii=" -Tascii"
602 ac_cv_nroff_tascii=""
608 TROFFASCII="$ac_cv_nroff_tascii"
612 dnl Check for - option to file
614 AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
615 if $HAVE_FILECMD; then
616 AC_MSG_CHECKING(for - option to file command)
617 AC_CACHE_VAL(ac_cv_filestdin, [
618 cat > conftest.c <<EOF
626 cat > conftest.sed <<EOF
630 filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
631 filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
632 if test "$filehyphen_1" = "$filehyphen_2"; then
638 rm conftest.c conftest.sed
643 if test x$ac_cv_filestdin = xyes; then
644 AC_DEFINE(FILE_STDIN)
646 filestdin=$ac_cv_filestdin
647 AC_MSG_RESULT($filestdin)
650 dnl Check for -L option to file
653 AC_MSG_CHECKING(for -L option to file command)
654 AC_CACHE_VAL(ac_cv_filel, [
655 file -L . > /dev/null 2>&1
663 if test x$ac_cv_filel = xyes; then
667 AC_MSG_RESULT($filel)
671 dnl Check to see if grep program allowes dash to denote stdin
673 AC_MSG_CHECKING(for - option to grep command)
674 AC_CACHE_VAL(ac_cv_grep_stdin, [
675 grep ac_cv_grep_stdin - > /dev/null 2>&1 < ./configure
682 if test x$ac_cv_grep_stdin = xyes; then
683 AC_DEFINE(GREP_STDIN)
685 AC_MSG_RESULT($ac_cv_grep_stdin)
688 dnl The subshell support
691 AC_MSG_CHECKING(for subshell support)
692 AC_ARG_WITH(subshell,
693 [--with-subshell If you want to use a concurrent shell],
695 if test x$withval = xoptional
697 AC_DEFINE(SUBSHELL_OPTIONAL)
698 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
701 if test x$withval = xyes
703 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
706 dnl Default: provide the subshell support on non-ultrix machines
707 if test $system = ULTRIX
711 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
715 AC_MSG_RESULT($result)
728 dnl This option is only inteded for being used by me :-)
729 dnl It has some nasty hacks built in.
733 [--with-debug For use by developers only: activates -Wall and MAD],
734 [if test x$withval = xyes; then
735 CFLAGS="$CFLAGS -Wall"
736 mem_debug="Janne's MAD library"
739 if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
741 CFLAGS="$CFLAGS -Wno-implicit"
743 if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
746 if test $cc_uses_g = yes; then
750 AC_MSG_RESULT(compiling with -Wall and the memory leak detector)
754 dnl This option is only inteded for being used by me :-)
755 dnl It has some nasty hacks built in.
758 [--with-efence Developers only: activates -Wall and efence],
759 [if test x$withval = xyes; then
760 CFLAGS="$CFLAGS -Wall"
762 LIBS="$LIBS -lefence"
763 if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
765 CFLAGS="$CFLAGS -Wno-implicit"
767 if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
770 if test $cc_uses_g = yes; then
774 AC_MSG_RESULT(compiling with -Wall and Electric fence)
775 mem_debug="Electric Fence"
780 if test x$USE_NLS = xyes; then
781 if test x$USE_INCLUDED_LIBINTL = xyes; then
782 CPPFLAGS="$CPPFLAGS -I\$(builddir)/intl"
783 LINTL="-L\$(builddir)/intl -lintl"
791 dnl To force mmap support
792 dnl We use only part of the functionality of mmap, so on AIX,
793 dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
796 [--with-mmap To force using the mmap call (AIX)],
797 [if test x$withval = xyes; then
799 AC_MSG_RESULT(forcing MMAP support)
802 AC_DEFUN(AC_USE_TERMINFO,
803 AC_DEFINE(SLANG_TERMINFO)
804 AC_MSG_RESULT(Using SLang screen manager/terminfo)
805 slang_term=" with terminfo"
808 AC_DEFUN(AC_USE_TERMCAP,
809 AC_MSG_RESULT(Using SLang screen manager/termcap)
810 AC_DEFINE(USE_TERMCAP)
811 dnl Check with $LIBS at the end so that it works with ELF libs.
812 AC_CHECK_LIB(termcap, tgoto, LIBS="$LIBS -ltermcap", , $LIBS)
813 slang_term=" with termcap"
818 slang_use_system_installed_lib=false
819 AC_CHECK_LIB(slang,SLang_init_tty,
820 AC_CHECK_HEADERS(slang.h)
821 if test x$ac_cv_header_slang_h = xyes
823 slang_use_system_installed_lib=true
824 slang_check_lib=false
826 AC_CHECK_HEADERS(slang/slang.h)
827 if test x$ac_cv_header_slang_slang_h = xyes
829 slang_use_system_installed_lib=true
830 slang_check_lib=false
831 AC_DEFINE(SLANG_H_INSIDE_SLANG_DIR)
836 AC_ARG_WITH(terminfo,
837 [--with-terminfo SLANG: Force usage of terminfo],[
838 if test x$withval = xyes; then
840 slang_check_lib=false
841 slang_use_system_installed_lib=false
846 [--with-termcap SLANG: Force usage of termcap],[
847 if test x$withval = xyes; then
849 slang_check_lib=false
850 slang_use_system_installed_lib=false
854 AC_ARG_WITH(included-slang,
855 [--with-included-slang SLANG: use the SLang library included here],[
856 if test x$withval = xyes; then
857 slang_use_system_installed_lib=false
862 AC_DEFUN(AC_WITH_SLANG,[
863 AC_DEFINE(HAVE_SLANG)
865 if $slang_use_system_installed_lib
867 AC_DEFINE(HAVE_SYSTEM_SLANG)
869 screen_manager="SLang (system-installed library)"
870 AC_MSG_RESULT(Using system installed SLang library)
876 #ifdef SLANG_H_INSIDE_SLANG_DIR
877 #include <slang/slang.h>
886 [LIBS="$ac_save_LIBS"; AC_USE_TERMINFO],
887 [LIBS="$ac_save_LIBS"; AC_USE_TERMCAP])
889 MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)"
890 LIBSLANG="libmcslang.a"
891 screen_manager="SLang"
893 CPPFLAGS="$CPPFLAGS -I../slang"
894 fastdepslang=fastdepslang
898 /*) ln -sf $srcdir/slang/slang-mc.h slang/slang.h;;
899 *) ln -sf ../$srcdir/slang/slang-mc.h slang/slang.h;;
905 for dir in /usr/lib /usr/share/lib /usr/local/lib /lib \
906 /usr/local/share /usr/share
908 if test -d $dir/terminfo; then
913 if $use_terminfo; then
925 [--with-slang Compile with the slang screen manager],[
926 if test x$withval = xyes; then
933 AC_SUBST(fastdepslang)
935 AC_DEFUN(AC_WITH_EDIT, [
936 AC_DEFINE(USE_INTERNAL_EDIT)
937 LIBEDIT_A="libedit.a"
940 CPPFLAGS="$CPPFLAGS -I\$(rootdir)"
942 AC_MSG_RESULT(will call internal editor)
950 [--with-edit Define INTERNAL_EDIT],
951 if test x$withval = xyes
957 dnl Default: provide the internal editor
965 [--with-netrc Compile with ftp .netrc support],[
966 if test x$withval = xyes; then
968 AC_MSG_RESULT(ftpfs will have .netrc parsing code)
973 AC_DEFUN(AC_EXT2_UNDEL, [
975 if test "$ext2fs_undel" = yes; then
976 AC_MSG_RESULT(With ext2fs file recovery code)
977 vfs_flags="${vfs_flags}, undelfs"
978 undelfs_o="undelfs.o"
979 LIBS="$LIBS $EXT2FS_UNDEL_LIBS"
981 AC_MSG_WARN(No ext2fs file recovery code)
985 AC_ARG_WITH(ext2undel,
986 [--with-ext2undel Compile with ext2 undelete code],[
987 if test x$withval != xno;
989 if test x$withval != xyes
991 LIBS="$LIBS -L$withval/lib"
992 CPPFLAGS="$CPPFLAGS -I$withval/include"
997 AC_CHECK_LIB(ext2fs, ext2fs_close, AC_EXT2_UNDEL,,-lcom_err)
1003 dnl Parameters: directory filename LIBS_append CPPFLAGS_append nicename
1005 AC_DEFUN(AC_NCURSES, [
1010 AC_MSG_RESULT(Found ncurses on $1/$2)
1012 CPPFLAGS="$CPPFLAGS $4"
1013 search_ncurses=false
1015 AC_DEFINE(USE_NCURSES)
1022 AC_CHECKING("location of ncurses.h file")
1024 AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
1025 AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
1026 AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
1027 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")
1029 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")
1031 AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
1034 dnl We couldn't find ncurses, try SysV curses
1038 AC_EGREP_HEADER(init_color, /usr/include/curses.h,
1040 AC_EGREP_CPP(USE_NCURSES,[
1047 CPPFLAGS="$CPPFLAGS -DRENAMED_NCURSES"
1048 AC_DEFINE(USE_NCURSES)
1049 search_ncurses=false
1050 screen_manager="ncurses installed as curses"
1055 dnl Try SunOS 4.x /usr/5{lib,include} ncurses
1056 dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
1057 dnl should be replaced by a more fine grained selection routine
1061 if test -f /usr/5include/curses.h
1066 # check for ncurses version, to properly ifdef mouse-fix
1067 AC_MSG_CHECKING(for ncurses version)
1068 ncurses_version=unknown
1069 cat > conftest.$ac_ext <<EOF
1070 [#]line __oline__ "configure"
1071 #include "confdefs.h"
1072 #ifdef RENAMED_NCURSES
1075 #include <ncurses.h>
1078 VERSION:NCURSES_VERSION
1080 if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
1081 egrep "VERSION:" >conftest.out 2>&1; then
1083 ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'`
1087 AC_MSG_RESULT($ncurses_version)
1088 case "$ncurses_version" in
1092 AC_DEFINE(NCURSES_970530,2)
1095 AC_DEFINE(NCURSES_970530,1)
1098 AC_DEFINE(NCURSES_970530,0)
1104 dnl Ncurses may be linked against libgpm. Change LIBS temporary for
1105 dnl check for resizeterm and keyok.
1109 AC_CHECK_FUNCS(resizeterm keyok)
1112 if test "x$screen_manager" = "xunknown"; then
1117 dnl The variables used for expanding the auto saver.
1124 if test $system = Linux
1126 saver="install.saver"
1127 saver_target="cons.saver"
1128 vcs="install.create_vcs"
1132 dnl On Linux, check for PAM authentication available
1134 AC_CHECK_LIB(pam, pam_start, [
1136 PAMLIBS="-lpam -ldl"
1140 AC_SUBST(saver_target)
1146 dnl We need sed in order to fix the library files
1148 SEDCMD="sed 's/-man/$MANDOC/'"
1149 SEDCMD2="sed 's%@prefix@%\$(prefix)%'"
1153 if test x$no_xview = xyes; then
1157 if test x$ac_cv_has_xpm = xyes; then
1160 AC_X_SHAPE_EXTENSION
1161 if test x$ac_cv_has_shape = xyes; then
1162 AC_DEFINE(HAVE_XPM_SHAPE)
1171 dnl This code should be moved to the ac_WITH_SLANG
1173 dnl We check for the existance of setupterm on curses library
1174 dnl this is required to load certain definitions on some termcaps
1175 dnl editions (AIX and OSF/1 I seem to remember).
1176 dnl Note that we avoid using setupterm
1177 case $screen_manager in
1179 [Ss][Ll][Aa][Nn][Gg]*)
1180 changequote([, ])dnl
1181 if test $system = Linux
1185 AC_CHECK_LIB(curses,setupterm,[
1188 #include <term.h>],[
1189 if (key_end == parm_insert_line)
1193 LIBS="$LIBS -lcurses"
1194 AC_DEFINE(USE_SETUPTERM)])])
1199 LIBS="$LIBS $posix_libs"
1201 CPPFLAGS="-I.. $CPPFLAGS"
1204 AC_SUBST(MCCPPFLAGS)
1208 ac_cv_make_with_percent_rules=no
1209 if test x$ac_cv_prog_gnu_make = xyes; then
1210 MCFG='include ../Make.common'
1211 MCFGR='include ./Make.common'
1214 DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \
1218 ac_cv_make_with_percent_rules=yes
1225 WRITEDEP='sed "/^. \*\*\*Dependencies\*\*\*/,/^. \*\*\*End of dependencies\*\*\*/d" < Makefile > Makefile.conf; { cat Makefile.conf; echo "# ***Dependencies***Do not edit***"; cat .depend; echo "# ***End of dependencies***" } > Makefile; $(RMF) Makefile.conf .depend'
1234 if test x$ac_cv_make_with_percent_rules = xyes; then
1244 SHELL=${SHELL-"/bin/sh"}
1248 dnl Output configuration filesn
1251 AC_CONFIG_SUBDIRS(vfs/samba)
1260 doc-gnome/C/Makefile
1261 vfs/Makefile:vfs/Make-mc.in
1280 vfs/extfs/ftplist vfs/extfs/uzip vfs/extfs/uzoo vfs/extfs/lslR vfs/extfs/ulha
1281 vfs/extfs/uha vfs/extfs/ucpio vfs/extfs/deb vfs/extfs/urar vfs/extfs/uar
1283 doc/mc.1 doc/mcedit.1 doc/mcserv.8
1285 intl/Makefile po/Makefile.in
1286 ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
1288 if test x$srcdir != x; then
1289 if test $srcdir != .; then
1292 cp $srcdir/pc/Makefile nt/Makefile
1296 if echo "$screen_manager" | grep -q "SLang" ; then
1297 screen_manager="${screen_manager}${slang_term}"
1303 Source code location: ${srcdir}
1305 Compiler flags: ${CFLAGS}
1306 File system: ${vfs_type}
1308 Text mode screen manager: ${screen_manager}
1309 Install console saver: ${install_saver}
1310 Text mode mouse library: ${mouse_lib}
1311 Text mode X11 support: ${textmode_x11_support}
1312 Debugger code: ${mem_debug}
1313 With subshell support: ${subshell}
1314 X11 versions: ${xvers}
1315 Internal editor: ${EDIT_msg}
1316 Install path: ${prefix}/bin, ${prefix}/lib/mc"
1317 if test -n "$xv_bindir"; then
1318 echo " XView version install path: ${xv_bindir}"