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")
14 dnl This is path where we're looking for headers in addition to /usr/include
15 dnl and whatever cpp defaults to.
16 include_additional_path="/usr/local/include /usr/contrib/include /opt/gnu/include"
18 dnl This sets/resets compiling with -g by default. It should be set to yes for
19 dnl development versions and set to no for release versions.
22 dnl We want autoconf to check whether -g is available
23 dnl We reset it back soon.
27 dnl Find out, if we should default to /usr/local or /usr
36 if test x"$AWK" = x; then
43 # test whether awk needs -v for variables (e.g. Solaris) or not (e.g. SunOs 4)
44 if test x"`echo | $AWK 'BEGIN { print variable; exit }' variable=123`" = x123; then
50 AC_SUBST(AWK_VAR_OPTION)
60 AC_PATH_PROG(MV, mv, mv)
61 AC_PATH_PROG(CP, cp, cp)
62 AC_PATH_PROG(RM, rm, rm)
63 AC_PATH_PROG(CHMOD, chmod, :)
64 AC_PATH_PROG(AR, ar, ar)
66 AC_CHECK_PROG(system,uname,`uname`,unknown)
67 AC_CHECK_PROGS(X11_WWW,netscape arena Mosaic chimera)
68 if test x"$X11_WWW" = x; then
72 ALL_LINGUAS="es fr ru ko it de pl no"
74 AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
77 dnl This part supplies reasonable defaults for CFLAGS, if they weren't
78 dnl specified by ''CFLAGS=flags ./configure''
81 if test x$GCC = xyes; then
82 if test x$ac_cv_prog_gcc_g = xyes; then
89 dnl Debug mode is turned ON for now
90 if test "x$CCOPTS" = x; then
94 if test "x$CCOPTS" = x; then
95 if test x$GCC = xyes; then
96 if test x$system = xLinux; then
97 CCOPTS='-O2 -fno-strength-reduce'
98 if test x$use_cc_g_flag = xyes; then
99 if test $cc_uses_g = yes; then
105 if test x$use_cc_g_flag = xyes; then
106 if test $cc_uses_g = yes; then
112 if test x$use_cc_g_flag = xyes; then
126 LIBS="$LIBS $GLIB_LIBS"
127 CFLAGS="$CFLAGS $GLIB_CFLAGS"
130 dnl For A/UX. Do not move
134 if test $system = A/UX
137 AC_DEFINE(_POSIX_SOURCE)
141 AC_CHECK_HEADERS(unistd.h string.h memory.h crypt.h grp.h limits.h malloc.h)
142 AC_CHECK_HEADERS(stdlib.h termios.h)
144 if test x$ac_cv_header_malloc_h = xno; then
145 echo '/* NeXTStep malloc.h stub */' > $srcdir/malloc.h
154 #Let me check for an incompatible regcomp in HP-UX before making this
160 dnl Missing structure components
166 dnl Check availability of some functions
169 AC_CHECK_FUNCS(strerror statfs getwd strcasecmp strncasecmp)
170 AC_CHECK_FUNCS(strdup memmove pwdauth truncate initgroups putenv)
171 AC_CHECK_FUNCS(memset memcpy tcsetattr tcgetattr cfgetospeed)
172 AC_CHECK_FUNCS(sigaction sigemptyset sigprocmask sigaddset)
173 AC_CHECK_FUNCS(sysconf setuid setreuid)
176 if test x$system = xLinux; then
177 AC_CHECK_LIB(shadow,pw_encrypt,[
179 AC_CHECK_HEADERS(shadow.h)
180 if test x$ac_cv_header_shadow_h = xyes; then
183 AC_CHECK_HEADERS(shadow/shadow.h)
184 if test x$ac_cv_shadow_shadow_h = xyes; then
188 if test $shadow_header = yes; then
189 AC_DEFINE(LINUX_SHADOW)
196 NEED_CRYPT_PROTOTYPE=yes
197 if test x$ac_cv_header_crypt_h = xyes; then
198 AC_TRY_WARNINGS([#include <crypt.h>], [char *p = crypt("xxx", "yyy");],[
199 NEED_CRYPT_PROTOTYPE=no])
201 if test x$ac_cv_header_unistd_h = xyes; then
202 AC_TRY_WARNINGS([#include <unistd.h>], [char *p = crypt("xxx", "yyy");],[
203 NEED_CRYPT_PROTOTYPE=no])
206 if test x$NEED_CRYPT_PROTOTYPE=xyes; then
207 AC_DEFINE(NEED_CRYPT_PROTOTYPE)
211 dnl AIX and Sequent need <sys/select.h> for fd_set
213 AC_CHECK_HEADERS(sys/select.h)
216 dnl On SCO and some SVR4, crypt is on libcrypt.a
217 dnl grantpt in libpt.a
220 AC_CHECK_FUNCS(crypt, , [
221 AC_CHECK_LIB(crypt, crypt, LCRYPT="-lcrypt",[
222 AC_CHECK_LIB(crypt_i, crypt, LCRYPT="-lcrypt_i")])])
225 dnl This is the correct version
226 dnl AC_CHECK_FUNCS(grantpt, , AC_CHECK_LIB(pt, grantpt))
228 dnl And workaround for a Autoconf 2.4 bug:
229 AC_CHECK_FUNCS(grantpt)
230 if test x$ac_cv_func_grantpt = xyes; then
233 AC_CHECK_LIB(pt, grantpt)
237 dnl libintl.a required on SCO to provide proper NLS support
238 dnl (using native cc links it by default)
240 if test x$GCC = xyes; then
241 AC_CHECK_LIB(intl, tolower)
244 dnl replacing lstat with statlstat on sco makes it more portable between
246 AC_CHECK_FUNCS(statlstat)
249 dnl If running under AIX, AC_AIX does not tell us that
251 AC_MSG_CHECKING(for AIX defines)
253 [#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
259 ], AC_MSG_RESULT(no))
262 dnl This hack is here until autoconf adds it
263 dnl Needed for Unixware: getmntent is on libgen.a
265 AC_CHECK_LIB(gen, getmntent, [LIBS="-lgen $LIBS"])
268 dnl This is from GNU fileutils, check aclocal.m4 for more information
273 dnl Missing typedefs and replacements
277 AC_CHECK_TYPE(umode_t, int)
278 AC_CHECK_TYPE(off_t, long)
281 AC_CHECK_TYPE(nlink_t, unsigned int)
287 dnl Cool hack, but we don't use it currently
289 dnl AC_MSG_CHECKING(for token pasting method)
290 dnl AC_EGREP_CPP(portable,[
291 dnl #define tken(a, b) a##b
293 dnl ], [AC_DEFINE(HAVE_PORTABLE_TOKEN_PASTING)
294 dnl AC_MSG_RESULT(portable)
296 dnl AC_MSG_RESULT(non-portable)
302 dnl Network related functions
305 AC_CHECK_LIB(nsl, t_accept)
306 AC_CHECK_LIB(socket, socket)
309 AC_CHECK_FUNCS(socket, have_socket=yes)
310 if test $have_socket = no; then
311 # socket is not in the default libraries. See if it's in some other.
312 for lib in bsd socket inet; do
313 AC_CHECK_LIB($lib, socket, [
316 AC_DEFINE(HAVE_SOCKET)
321 have_gethostbyname=no
322 AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
323 if test $have_gethostbyname = no; then
324 # gethostbyname is not in the default libraries. See if it's in some other.
325 for lib in bsd socket inet; do
326 AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
330 AC_CHECK_FUNCS(socketpair)
333 dnl Sequent wants getprocessstats
335 AC_CHECK_LIB(seq, get_process_stats, [
337 AC_DEFINE(HAVE_GET_PROCESS_STATS)])
341 if test $have_socket = yes; then
342 NETFILES="\$(NETFILES)"
346 screen_manager=unknown
350 LDFLAGS=${LDFLAGS--O}
352 AC_DEFUN(AC_USE_SUNOS_CURSES, [
354 screen_manager="SunOS 4.x /usr/5include curses"
355 AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
356 AC_DEFINE(USE_SUNOS_CURSES)
357 AC_DEFINE(NO_COLOR_CURSES)
358 AC_DEFINE(USE_SYSV_CURSES)
359 CPPFLAGS="$CPPFLAGS -I/usr/5include"
360 XCURSES="xcurses.o /usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
361 AC_MSG_RESULT(Please note that some screen refreshs may fail)
362 AC_WARN(Reconsider using Slang)
365 AC_DEFUN(AC_USE_OSF1_CURSES, [
366 AC_MSG_RESULT(Using OSF1 curses)
368 screen_manager="OSF1 curses"
369 AC_DEFINE(NO_COLOR_CURSES)
370 AC_DEFINE(USE_SYSV_CURSES)
372 LIBS="$LIBS -lcurses"
375 AC_DEFUN(AC_USE_SYSV_CURSES, [
376 AC_MSG_RESULT(Using SysV curses)
377 AC_DEFINE(USE_SYSV_CURSES)
380 screen_manager="SysV/curses"
381 LIBS="$LIBS -lcurses"
387 dnl AC_ARG_WITH(bsd-curses,
388 dnl [--with-bsd-curses Used to compile with bsd curses, not very fancy],
389 dnl search_ncurses=false
390 dnl screen_manager="Ultrix/cursesX"
391 dnl if test $system = ULTRIX
393 dnl THIS_CURSES=cursesX
395 dnl THIS_CURSES=curses
398 dnl LIBS="$LIBS -l$THIS_CURSES -ltermcap"
399 dnl AC_DEFINE(USE_BSD_CURSES)
400 dnl XCURSES="xcurses.o"
401 dnl AC_MSG_RESULT(Please note that some screen refreshs may fail)
402 dnl AC_WARN(Use of the bsdcurses extension has some)
403 dnl AC_WARN(display/input problems.)
404 dnl AC_WARN(Reconsider using xcurses)
408 [--with-sco Use this to turn on SCO-specific code],[
409 if test x$withval = xyes; then
410 AC_DEFINE(SCO_FLAVOR)
411 CFLAGS="$CFLAGS -D_SVID3"
415 AC_ARG_WITH(sunos-curses,
416 [--with-sunos-curses Used to force SunOS 4.x curses],[
417 if test x$withval = xyes; then
422 AC_ARG_WITH(osf1-curses,
423 [--with-osf1-curses Used to force OSF/1 curses],[
424 if test x$withval = xyes; then
430 [--with-vcurses[=incdir] Used to force SysV curses],
431 if test x$withval = xyes; then
434 CPPFLAGS="$CPPFLAGS -I$withval"
439 mouse_lib="xterm only"
441 AC_ARG_WITH(gpm-mouse,
442 [--with-gpm-mouse[=base-dir] Compile with gpm mouse support],[
443 if test x$withval != xno
445 if test x$withval != xyes
447 LIBS="$LIBS -L$withval/lib"
448 CPPFLAGS="$CPPFLAGS -I$withval/include"
450 AC_DEFINE(HAVE_LIBGPM)
451 mouse_lib="GPM and xterm"
455 AC_CHECK_LIB(gpm, Gpm_Repeat,[
456 AC_DEFINE(HAVE_LIBGPM)
457 mouse_lib="GPM and xterm"
459 if test $system = Linux
461 AC_MSG_WARN("libgpm.a is missing or older than 0.18")
469 [--with-ncurses[=base-dir] Compile with ncurses/locate base dir],
470 if test x$withval = xyes
474 LIBS="$LIBS -L$withval/lib -lncurses"
475 CPPFLAGS="$CPPFLAGS -I$withval/include"
477 screen_manager="ncurses"
478 AC_DEFINE(USE_NCURSES)
483 [--with-hsc Compile with support for the HSC firewall],
484 if test x$withval = xyes; then
499 libgtkedit="libgtkedit.a"
500 insticons=install_icons
501 if test x"$xvers" = xnone; then
510 AC_SUBST(GNOMEGNORBA_LIBS)
513 dnl Check for the -mandoc package
515 AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
517 AC_MSG_CHECKING(for manual formatting macros)
518 AC_CACHE_VAL(ac_cv_mandoc, [
519 nroff -mandoc < /dev/null > /dev/null 2>&1 /dev/null
528 AC_MSG_RESULT($MANDOC)
535 dnl Check if nroff accepts -Tascii
538 AC_MSG_CHECKING(If nroff accepts -Tascii)
539 AC_CACHE_VAL(ac_cv_nroff_tascii, [
540 nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
543 ac_cv_nroff_tascii=" -Tascii"
546 ac_cv_nroff_tascii=""
551 TROFFASCII="$ac_cv_nroff_tascii"
555 dnl Check for - option to file
557 AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
558 if $HAVE_FILECMD; then
559 AC_MSG_CHECKING(for - option to file command)
560 AC_CACHE_VAL(ac_cv_filestdin, [
561 cat > conftest.c <<EOF
569 cat > conftest.sed <<EOF
573 filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
574 filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
575 if test "$filehyphen_1" = "$filehyphen_2"; then
581 rm conftest.c conftest.sed
586 if test x$ac_cv_filestdin = xyes; then
587 AC_DEFINE(FILE_STDIN)
589 filestdin=$ac_cv_filestdin
590 AC_MSG_RESULT($filestdin)
593 dnl Check for -L option to file
596 AC_MSG_CHECKING(for -L option to file command)
597 AC_CACHE_VAL(ac_cv_filel, [
598 file -L . > /dev/null 2>&1
606 if test x$ac_cv_filel = xyes; then
610 AC_MSG_RESULT($filel)
614 dnl Check to see if grep program allowes dash to denote stdin
616 AC_MSG_CHECKING(for - option to grep command)
617 AC_CACHE_VAL(ac_cv_grep_stdin, [
618 grep ac_cv_grep_stdin - > /dev/null 2>&1 < ./configure
625 if test x$ac_cv_grep_stdin = xyes; then
626 AC_DEFINE(GREP_STDIN)
628 AC_MSG_RESULT($ac_cv_grep_stdin)
631 dnl The termnet support
635 [--with-termnet If you want a termified net support],[
636 if test x$withval = xyes; then
637 AC_DEFINE(USE_TERMNET)
643 dnl The subshell support
646 AC_MSG_CHECKING(for subshell support)
647 AC_ARG_WITH(subshell,
648 [--with-subshell If you want to use a concurrent shell],
650 if test x$withval = xoptional
652 AC_DEFINE(SUBSHELL_OPTIONAL)
653 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
656 if test x$withval = xyes
658 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
661 dnl Default: provide the subshell support on non-ultrix machines
662 if test $system = ULTRIX
666 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
670 AC_MSG_RESULT($result)
683 dnl This option is only inteded for being used by me :-)
684 dnl It has some nasty hacks built in.
688 [--with-debug For use by developers only: activates -Wall and MAD],
689 [if test x$withval = xyes; then
690 CFLAGS="$CFLAGS -Wall"
691 mem_debug="Janne's MAD library"
694 if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
696 CFLAGS="$CFLAGS -Wno-implicit"
698 if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
701 if test $cc_uses_g = yes; then
705 AC_MSG_RESULT(compiling with -Wall and the memory leak detector)
709 dnl This option is only inteded for being used by me :-)
710 dnl It has some nasty hacks built in.
713 [--with-efence Developers only: activates -Wall and efence],
714 [if test x$withval = xyes; then
715 CFLAGS="$CFLAGS -Wall"
717 LIBS="$LIBS -lefence"
718 if [ echo `uname -s -r` | grep -q 'SunOS 4.1' ]
720 CFLAGS="$CFLAGS -Wno-implicit"
722 if echo "$CFLAGS" | grep -e -g >/dev/null 2>&1; then
725 if test $cc_uses_g = yes; then
729 AC_MSG_RESULT(compiling with -Wall and Electric fence)
730 mem_debug="Electric Fence"
735 if test x$USE_NLS = xyes; then
736 if test x$USE_INCLUDED_LIBINTL = xyes; then
737 CPPFLAGS="$CPPFLAGS -I\$(builddir)/intl"
738 LINTL="-L\$(builddir)/intl -lintl"
746 dnl To force mmap support
747 dnl We use only part of the functionality of mmap, so on AIX,
748 dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
751 [--with-mmap To force using the mmap call (AIX)],
752 [if test x$withval = xyes; then
754 AC_MSG_RESULT(forcing MMAP support)
757 AC_DEFUN(AC_USE_TERMINFO,
758 AC_DEFINE(SLANG_TERMINFO)
759 AC_MSG_RESULT(Using SLang screen manager/terminfo)
760 slang_term=" with terminfo"
763 AC_DEFUN(AC_USE_TERMCAP,
764 AC_MSG_RESULT(Using SLang screen manager/termcap)
765 AC_DEFINE(USE_TERMCAP)
766 dnl Check with $LIBS at the end so that it works with ELF libs.
767 AC_CHECK_LIB(termcap, tgoto, LIBS="$LIBS -ltermcap", , $LIBS)
768 slang_term=" with termcap"
773 slang_use_system_installed_lib=false
774 AC_CHECK_LIB(slang,SLang_init_tty,
775 AC_CHECK_HEADERS(slang.h)
776 if test x$ac_cv_header_slang_h = xyes
778 slang_use_system_installed_lib=true
779 slang_check_lib=false
781 AC_CHECK_HEADERS(slang/slang.h)
782 if test x$ac_cv_header_slang_slang_h = xyes
784 slang_use_system_installed_lib=true
785 slang_check_lib=false
786 AC_DEFINE(SLANG_H_INSIDE_SLANG_DIR)
791 AC_ARG_WITH(terminfo,
792 [--with-terminfo SLANG: Force usage of terminfo],[
794 slang_check_lib=false
795 slang_use_system_installed_lib=false
800 [--with-termcap SLANG: Force usage of termcap],[
802 slang_check_lib=false
803 slang_use_system_installed_lib=false
807 AC_ARG_WITH(included-slang,
808 [--with-included-slang SLANG: use the SLang library included here],[
809 slang_use_system_installed_lib=false
814 AC_DEFUN(AC_WITH_SLANG,
815 AC_DEFINE(HAVE_SLANG)
817 if $slang_use_system_installed_lib
819 AC_DEFINE(HAVE_SYSTEM_SLANG)
821 screen_manager="SLang (using system-installed library)"
822 AC_MSG_RESULT(Using system installed SLang library)
825 MCCPPFLAGS="$MCCPPFLAGS -I\$(slangdir)"
826 LIBSLANG="libmcslang.a"
827 screen_manager="SLang"
829 CPPFLAGS="$CPPFLAGS -I../slang"
830 fastdepslang=fastdepslang
832 ln -s ../$srcdir/slang/slang-mc.h slang/slang.h
837 if test -d /usr/lib/terminfo; then
840 if test -d /usr/share/lib/terminfo; then
843 if test -d /usr/local/lib/terminfo; then
846 if test -d /lib/terminfo; then
849 if test -d /usr/local/share/terminfo; then
852 if test -d /usr/share/terminfo; then
855 if $use_terminfo; then
867 [--with-slang Compile with the slang screen manager],[
868 if test x$withval = xyes; then
875 AC_SUBST(fastdepslang)
878 AC_DEFUN(AC_WITH_VFS, [
880 if $use_net_code; then
881 AC_DEFINE(USE_NETCODE)
885 fastdepvfs=fastdepvfs
886 MCCPPFLAGS="$MCCPPFLAGS -I\$(vfsdir)"
887 AC_MSG_RESULT(Using the VFS switch code)
888 vfs_type="Midnight Commander Virtual File System"
897 [--with-vfs Compile with the VFS code],
898 if test x$withval = xyes
906 dnl Default: provide the VFS code
913 AC_DEFUN(AC_WITH_EDIT, [
914 AC_DEFINE(USE_INTERNAL_EDIT)
915 LIBEDIT_A="libedit.a"
918 CPPFLAGS="$CPPFLAGS -I\$(rootdir)"
920 AC_MSG_RESULT(will call internal editor)
928 [--with-edit Define INTERNAL_EDIT],
929 if test x$withval = xyes
935 dnl Default: provide the internal editor
943 [--with-netrc Compile with ftp .netrc support],[
945 AC_MSG_RESULT(ftpfs will have .netrc parsing code)
949 AC_DEFUN(AC_EXT2_UNDEL, [
951 if test "$ext2fs_undel" = yes; then
952 AC_MSG_RESULT(With ext2fs file recovery code)
953 vfs_flags="${vfs_flags} undelfs"
954 undelfs_o="undelfs.o"
955 LIBS="$LIBS $EXT2FS_UNDEL_LIBS"
957 AC_MSG_WARN(No ext2fs file recovery code)
961 AC_ARG_WITH(ext2undel,
962 [--with-ext2undel Compile with ext2 undelete code],[
963 if test x$withval != xno;
965 if test x$withval != xyes
967 LIBS="$LIBS -L$withval/lib"
968 CPPFLAGS="$CPPFLAGS -I$withval/include"
973 AC_CHECK_LIB(ext2fs, ext2fs_close, AC_EXT2_UNDEL,,-lcom_err)
979 dnl Parameters: directory filename LIBS_append CPPFLAGS_append nicename
981 AC_DEFUN(AC_NCURSES, [
986 AC_MSG_RESULT(Found ncurses on $1/$2)
988 CPPFLAGS="$CPPFLAGS $4"
991 AC_DEFINE(USE_NCURSES)
998 AC_CHECKING("location of ncurses.h file")
1000 AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
1001 AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
1002 AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
1003 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")
1005 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")
1007 AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
1010 dnl We couldn't find ncurses, try SysV curses
1014 AC_EGREP_HEADER(init_color, /usr/include/curses.h,
1016 AC_EGREP_CPP(USE_NCURSES,[
1023 CPPFLAGS="$CPPFLAGS -DRENAMED_NCURSES"
1024 AC_DEFINE(USE_NCURSES)
1025 search_ncurses=false
1026 screen_manager="ncurses installed as curses"
1031 dnl Try SunOS 4.x /usr/5{lib,include} ncurses
1032 dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
1033 dnl should be replaced by a more fine grained selection routine
1037 if test -f /usr/5include/curses.h
1042 # check for ncurses version, to properly ifdef mouse-fix
1043 AC_MSG_CHECKING(for ncurses version)
1044 ncurses_version=unknown
1045 cat > conftest.$ac_ext <<EOF
1046 [#]line __oline__ "configure"
1047 #include "confdefs.h"
1048 #ifdef RENAMED_NCURSES
1051 #include <ncurses.h>
1054 VERSION:NCURSES_VERSION
1056 if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
1057 egrep "VERSION:" >conftest.out 2>&1; then
1059 ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'`
1063 AC_MSG_RESULT($ncurses_version)
1064 case "$ncurses_version" in
1068 AC_DEFINE(NCURSES_970530,2)
1071 AC_DEFINE(NCURSES_970530,1)
1074 AC_DEFINE(NCURSES_970530,0)
1080 dnl Ncurses may be linked against libgpm. Change LIBS temporary for
1081 dnl check for resizeterm and keyok.
1085 AC_CHECK_FUNCS(resizeterm keyok)
1088 if test "x$screen_manager" = "xunknown"; then
1093 dnl The variables used for expanding the auto saver.
1100 if test $system = Linux
1102 saver="install.saver"
1103 saver_target="cons.saver"
1104 vcs="install.create_vcs"
1108 dnl On Linux, check for PAM authentication available
1110 AC_CHECK_LIB(pam, pam_start, [
1112 PAMLIBS="-lpam -ldl"
1116 AC_SUBST(saver_target)
1122 dnl We need sed in order to fix the library files
1124 SEDCMD="sed 's/-man/$MANDOC/'"
1125 SEDCMD2="sed 's%@prefix@%\$(prefix)%'"
1129 if test x$no_xview = xyes; then
1133 if test x$ac_cv_has_xpm = xyes; then
1136 AC_X_SHAPE_EXTENSION
1137 if test x$ac_cv_has_shape = xyes; then
1138 AC_DEFINE(HAVE_XPM_SHAPE)
1147 dnl This code should be moved to the ac_WITH_SLANG
1149 dnl We check for the existance of setupterm on curses library
1150 dnl this is required to load certain definitions on some termcaps
1151 dnl editions (AIX and OSF/1 I seem to remember).
1152 dnl Note that we avoid using setupterm
1153 case $screen_manager in
1155 [Ss][Ll][Aa][Nn][Gg]*)
1156 changequote([, ])dnl
1157 if test $system = Linux
1161 AC_CHECK_LIB(curses,setupterm,[
1164 #include <term.h>],[
1165 if (key_end == parm_insert_line)
1169 LIBS="$LIBS -lcurses"
1170 AC_DEFINE(USE_SETUPTERM)])])
1175 LIBS="$LIBS $posix_libs"
1177 CPPFLAGS="-I.. $CPPFLAGS"
1180 AC_SUBST(MCCPPFLAGS)
1184 ac_cv_make_with_percent_rules=no
1185 if test x$ac_cv_prog_gnu_make = xyes; then
1186 MCFG='include ../Make.common'
1187 MCFGR='include ./Make.common'
1190 DOTDEPEND='ifeq (.depend,$(wildcard .depend)) \
1194 ac_cv_make_with_percent_rules=yes
1201 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'
1210 if test x$ac_cv_make_with_percent_rules = xyes; then
1221 dnl Output configuration filesn
1229 vfs/Makefile:vfs/Make-mc.in
1245 vfs/extfs/ftplist vfs/extfs/uzip vfs/extfs/uzoo vfs/extfs/lslR
1246 vfs/extfs/ulha vfs/extfs/ucpio vfs/extfs/deb vfs/extfs/urar vfs/extfs/uar
1248 doc/mc.1 doc/mcedit.1 doc/mcserv.8
1250 intl/Makefile po/Makefile.in
1251 ],[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
1253 if test x$srcdir != x; then
1254 if test $srcdir != .; then
1255 cp $srcdir/VERSION VERSION
1258 cp $srcdir/pc/Makefile nt/Makefile
1262 if test "x$screen_manager" = xSLang; then
1263 screen_manager="${screen_manager}${slang_term}"
1269 Source code location: ${srcdir}
1271 Compiler flags: ${CFLAGS}
1272 File system: ${vfs_type}
1274 Text mode screen manager: ${screen_manager}
1275 Install console saver: ${install_saver}
1276 Text mode mouse library: ${mouse_lib}
1277 Debugger code: ${mem_debug}
1278 With subshell support: ${subshell}
1279 X11 versions: ${xvers}
1280 Internal editor: ${EDIT_msg}
1281 Install path: ${prefix}/bin, ${prefix}/lib/mc"
1282 if test -n "$xv_bindir"; then
1283 echo " XView version install path: ${xv_bindir}"