Header modified...
[midnight-commander.git] / configure.in
blob7edbab35f1419ef06a7cbe8da87ee525e6837c10
1 dnl
2 dnl Configure.in file for the Midnight Commander
3 dnl
5 AC_INIT(GNU Midnight Commander, 4.5.99a, mc-devel@gnome.org)
6 AC_PREREQ(2.52)
7 AC_CONFIG_SRCDIR(src/main.c)
8 AC_CONFIG_AUX_DIR(config)
9 AM_INIT_AUTOMAKE(mc, 4.5.99a)
11 AM_CONFIG_HEADER(config.h)
12 AM_MAINTAINER_MODE
14 AC_PROG_LN_S
15 AC_CANONICAL_HOST
17 AC_AIX
18 AC_MINIX
19 AC_ISC_POSIX
21 AC_PROG_CC_STDC
23 AC_HEADER_MAJOR
24 AC_C_CONST
26 AC_SYS_LARGEFILE
28 AC_CHECK_TOOL(AR, ar, ar)
30 dnl Only list browsers here that can be run in background (i.e. with `&')
31 AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla konqueror opera netscape])
33 dnl
34 dnl Ovverriding mmap support.  This has to be before AC_FUNC_MMAP is used.
35 dnl We use only part of the functionality of mmap, so on AIX,
36 dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
37 dnl
38 AC_ARG_WITH(mmap, 
39         [--with-mmap                To force using the mmap call (AIX)],
40         [case $withval in
41 yes)
42         ac_cv_func_mmap_fixed_mapped=yes
43         AC_MSG_NOTICE([forcing MMAP support])
44         ;;
45 no)
46         ac_cv_func_mmap_fixed_mapped=no
47         AC_MSG_NOTICE([disabling MMAP support])
48         ;;
49 esac])
50 AC_FUNC_MMAP
52 if test "x$ALL_LINGUAS" = x; then
53 ALL_LINGUAS="az ca cs da de el es es_ES eu fi fr hu it ja ko lv nl no pl pt pt_BR ro ru sk sl sv uk ta tr wa zh_CN zh_TW"
56 dnl
57 dnl Internationalization
58 dnl
59 AM_GNU_GETTEXT
60 if test "x$USE_INCLUDED_LIBINTL" = xyes; then
61     CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
64 dnl
65 dnl Hack to make extraconf.h visible even if compiling outside srcdir.
66 dnl
67 CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)"
69 dnl
70 dnl Enforce coding standards
71 dnl
72 if test "x$GCC" = xyes; then
73     CFLAGS="$CFLAGS -Wall"
76 dnl
77 dnl We now use glib
78 dnl 
79 AM_PATH_GLIB(1.2.0,,[AC_MSG_ERROR([Test for GLIB failed.  MC requires GLIB.])])
80 LIBS="$LIBS $GLIB_LIBS"
82 dnl
83 dnl OS specific flags.
84 dnl
86 posix_libs=""
87 case $host_os in
88 aux*)
89     # A/UX
90     posix_libs="-lposix"
91     AC_DEFINE(_POSIX_SOURCE)
92     ;;
93 sco*)
94     AC_DEFINE(SCO_FLAVOR, 1, [Define if you want to turn on SCO-specific code])
95     AC_DEFINE(_SVID3, 1, [Needs to be defined on SCO])
96     ;;
97 esac
99 AC_PROG_INSTALL
100 AC_CHECK_HEADERS([unistd.h string.h memory.h crypt.h grp.h limits.h \
101         malloc.h stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h \
102         sys/time.h sys/timeb.h sys/select.h sys/ioctl.h stropts.h])
104 AC_HEADER_TIME
105 AC_HEADER_SYS_WAIT
106 AC_HEADER_DIRENT
107 AC_SHORT_D_NAME_LEN
108 AC_HEADER_STDC
110 dnl Missing structure components
111 AC_STRUCT_ST_BLKSIZE
112 AC_STRUCT_ST_BLOCKS
113 AC_STRUCT_ST_RDEV
116 dnl Check availability of some functions 
117 dnl 
119 AC_CHECK_FUNCS([strerror statfs strcasecmp strncasecmp strftime \
120                 strdup memmove pwdauth truncate initgroups putenv \
121                 memset memcpy tcsetattr tcgetattr cfgetospeed \
122                 sigaction sigemptyset sigprocmask sigaddset \
123                 sysconf setuid setreuid telldir seekdir])
126 dnl getpt is a GNU Extension (glibc 2.1.x)
128 AC_CHECK_FUNCS(getpt)
130 SHADOWLIB=
131 case $host_os in
132 linux*)
133     AC_CHECK_LIB(shadow,pw_encrypt,
134         [shadow_header=yes
135         AC_CHECK_HEADERS(shadow.h,,
136                 [AC_CHECK_HEADERS(shadow/shadow.h,,
137                         [shadow_header=no])])
138         if test $shadow_header = yes; then
139             AC_DEFINE(LINUX_SHADOW, 1,
140                       [Define to use shadow passwords on Linux])
141             SHADOWLIB=-lshadow
142         fi])
143     ;;
144 esac
145 AC_SUBST(SHADOWLIB)
147 NEED_CRYPT_PROTOTYPE=yes
148 if test x$ac_cv_header_crypt_h = xyes; then
149 AC_TRY_WARNINGS([#include <crypt.h>], [char *p = crypt("xxx", "yyy");
150 if (p)
151 return 0;],[
152 NEED_CRYPT_PROTOTYPE=no])
153 else 
154     if test x$ac_cv_header_unistd_h = xyes; then
155 AC_TRY_WARNINGS([#include <unistd.h>], [char *p = crypt("xxx", "yyy");
156 if (p)
157 return 0;],[
158 NEED_CRYPT_PROTOTYPE=no])
159     fi
161 if test x$NEED_CRYPT_PROTOTYPE = xyes; then
162 AC_DEFINE(NEED_CRYPT_PROTOTYPE, 1,
163           [Define if function `crypt' needs a prototype])
167 dnl On SCO and some SVR4, crypt is on libcrypt.a
168 dnl         grantpt in  libpt.a
170 LCRYPT=""
171 AC_CHECK_FUNCS(crypt, , [
172     AC_CHECK_LIB(crypt, crypt, [LCRYPT="-lcrypt"], [
173         AC_CHECK_LIB(crypt_i, crypt, [LCRYPT="-lcrypt_i"])])])
174 AC_SUBST(LCRYPT)
176 AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
178 dnl replacing lstat with statlstat on sco makes it more portable between
179 dnl sco clones
180 AC_CHECK_FUNCS(statlstat)
183 dnl If running under AIX, AC_AIX does not tell us that
185 AC_MSG_CHECKING([for AIX defines])
186 AC_EGREP_CPP(yes,
187 [#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
189 #endif
190 ], [
191 AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
192 AC_MSG_RESULT(yes)
193 ], [AC_MSG_RESULT(no)])
196 dnl This is from GNU fileutils, check aclocal.m4 for more information
198 AC_GET_FS_INFO
201 dnl Missing typedefs and replacements
202 dnl 
204 AC_TYPE_MODE_T
205 AC_CHECK_TYPE(umode_t, int)
206 AC_CHECK_TYPE(off_t, long)
207 AC_TYPE_PID_T
208 AC_TYPE_UID_T
209 AC_CHECK_TYPE(nlink_t, unsigned int)
211 AC_FUNC_ALLOCA
212 AC_FUNC_STRCOLL
215 dnl X11 support.
218 dnl These variables are only used when building the MC binary
219 MCCFLAGS=""
220 MCLIBS=""
221 AC_SUBST(MCCFLAGS)
222 AC_SUBST(MCLIBS)
224 textmode_x11_support="no"
225 AC_ARG_WITH(tm-x-support,
226         [--with-tm-x-support        Try getting events from X Window System],
227         [if test x$withval = xyes; then
228                 AC_PATH_XTRA
229                 MCCFLAGS="$X_CFLAGS"
230                 MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
231                 AC_DEFINE(HAVE_TEXTMODE_X11_SUPPORT, 1,
232                           [Define to enable getting events from X Window System])
233                 textmode_x11_support="yes"
234         fi
238 dnl Network related functions
241 AC_CHECK_LIB(nsl, t_accept)
242 AC_CHECK_LIB(socket, socket)
244 have_socket=no
245 AC_CHECK_FUNCS(socket, have_socket=yes)
246 if test $have_socket = no; then
247   # socket is not in the default libraries.  See if it's in some other.
248   for lib in bsd socket inet; do
249     AC_CHECK_LIB($lib, socket, [
250         LIBS="$LIBS -l$lib"
251         have_socket=yes
252         AC_DEFINE(HAVE_SOCKET)
253         break])
254   done
257 have_gethostbyname=no
258 AC_CHECK_FUNC(gethostbyname, [have_gethostbyname=yes])
259 if test $have_gethostbyname = no; then
260   # gethostbyname is not in the default libraries.  See if it's in some other.
261   for lib in bsd socket inet; do
262     AC_CHECK_LIB([$lib], [gethostbyname],
263                  [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
264   done
267 AC_CHECK_FUNCS(socketpair)
270 dnl Sequent wants getprocessstats
272 AC_CHECK_LIB(seq, get_process_stats, [
273         LIBS="$LIBS -lseq"
274         AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
275                   [Define if you have function `get_process_stats' and
276 have to use that instead of gettimeofday])])
278 MC_VFS_CHECKS
281 dnl Install mcserv only if explicitly enabled
283 AC_ARG_ENABLE([mcserv-install],
284               [--enable-mcserv-install    Install mcserv - Midnight Commander file server])
286 NETFILES=
287 if test $have_socket = yes; then
288    NETFILES="\$(NETFILES)"
290 AC_SUBST(NETFILES)
292 vfs_type="normal"
293 if test $use_vfs = yes
294 then
295         AC_MSG_NOTICE([enabling VFS code])
296         vfs_type="Midnight Commander Virtual File System"
299 screen_manager=unknown
300 search_ncurses=false
302 mouse_lib="xterm only"
303 case $host_os in
304 linux*)
305     AC_ARG_WITH(gpm-mouse, 
306         [--with-gpm-mouse[=base-dir]  Compile with gpm mouse support (Linux only)],
307         [if test x$withval != xno
308         then
309                 if test x$withval != xyes
310                 then
311                         LIBS="$LIBS -L$withval/lib"
312                         CPPFLAGS="$CPPFLAGS -I$withval/include"
313                 fi
314                 AC_DEFINE(HAVE_LIBGPM, 1,
315                           [Define to enable gpm mouse support on Linux])
316                 mouse_lib="GPM and xterm"
317                 MCLIBS="-lgpm $MCLIBS"
318         fi],
319         [AC_CHECK_LIB(gpm, Gpm_Repeat,
320                 [AC_DEFINE(HAVE_LIBGPM)
321                 mouse_lib="GPM and xterm"
322                 MCLIBS="-lgpm $MCLIBS"],
323                 [AC_MSG_WARN([libgpm is missing or older than 0.18])],
324                 [$LIBS])
325         ])
326     ;;
327 esac
329 AC_ARG_WITH(ncurses,
330         [--with-ncurses[=base-dir]    Compile with ncurses/locate base dir],
331         [if test x$withval = xyes
332         then
333                 search_ncurses=true
334         else
335                 MCLIBS="$MCLIBS -L$withval/lib -lncurses"
336                 CPPFLAGS="$CPPFLAGS -I$withval/include"
337                 search_ncurses=false
338                 screen_manager="ncurses"
339                 AC_DEFINE(USE_NCURSES)
340         fi
343 AC_ARG_WITH(hsc,
344         [--with-hsc                 Compile with support for the HSC firewall],
345         [if test x$withval = xyes; then
346                 AC_DEFINE(HSC_PROXY, 1,
347                           [Define if you want to use the HSC firewall])
348         fi
352 dnl Check for the -mandoc package
354 AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
355 if $HAVE_nroff; then
356     AC_MSG_CHECKING([for manual formatting macros])
357     AC_CACHE_VAL(ac_cv_mandoc, [
358     nroff -mandoc < /dev/null > /dev/null 2>&1
359     if test $? = 0
360     then
361         ac_cv_mandoc=-mandoc
362     else
363         ac_cv_mandoc=-man
364     fi
365     ])
366     MANDOC=$ac_cv_mandoc
367     AC_MSG_RESULT([$MANDOC])
368 else
369     MANDOC=-man
371 AC_SUBST(MANDOC)
374 dnl Check if nroff accepts -Tlatin1 or -Tascii
376 if $HAVE_nroff; then
377     AC_MSG_CHECKING([if nroff accepts -Tlatin1 or -Tascii])
378     AC_CACHE_VAL(ac_cv_nroff_tascii, [
379     nroff -Tlatin1 < /dev/null > /dev/null 2>&1 /dev/null
380     if test $? = 0
381     then
382         ac_cv_nroff_tascii=" -Tlatin1"
383     else
384         nroff -Tascii < /dev/null > /dev/null 2>&1 /dev/null
385         if test $? = 0
386         then
387             ac_cv_nroff_tascii=" -Tascii"
388         else
389             ac_cv_nroff_tascii=""
390         fi
391     fi
392     ])
393     if test "x$ac_cv_nroff_tascii" = x; then
394         AC_MSG_RESULT([no])
395     else
396         AC_MSG_RESULT([yes,$ac_cv_nroff_tascii])
397     fi
399 TROFFASCII="$ac_cv_nroff_tascii"
400 AC_SUBST(TROFFASCII)
403 dnl Check for - option to file
405 AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
406 if $HAVE_FILECMD; then
407     AC_MSG_CHECKING([for - option to file command])
408     AC_CACHE_VAL(ac_cv_filestdin, [[
409     cat > conftest.c <<\EOF
410 /* A comment */
411 #if 0
412 #endif
413 void main(void)
414 { return; }
416     cat > conftest.sed <<\EOF
417 s/^[^:]*:[      ]*//
418 s/[     ]*$//
420     filehyphen_1=`file conftest.c 2>/dev/null | sed -f conftest.sed`
421     filehyphen_2=`cat conftest.c | file - 2>/dev/null | sed -f conftest.sed`
422     if test "x$filehyphen_1" = "x$filehyphen_2"; then
423         ac_cv_filestdin=yes
424     else
425         ac_cv_filestdin=no
426     fi
427     rm conftest.c conftest.sed
428     ]])
430     if test x$ac_cv_filestdin = xyes; then
431         AC_DEFINE(FILE_STDIN, 1,
432                   [Define if the file command accepts - for stdin])
433     fi
434     filestdin=$ac_cv_filestdin
435     AC_MSG_RESULT([$filestdin])
437     dnl
438     dnl Check for -L option to file
439     dnl
441 AC_MSG_CHECKING([for -L option to file command])
442 AC_CACHE_VAL(ac_cv_filel, [
443 file -L . > /dev/null 2>&1
444 if test $? = 0
445 then
446     ac_cv_filel=yes
447 else
448     ac_cv_filel=no
451 if test x$ac_cv_filel = xyes; then
452     AC_DEFINE(FILE_L, 1, [Define if the file command accepts the -L option])
454 filel=$ac_cv_filel
455 AC_MSG_RESULT([$filel])
456 fi 
458 AC_MSG_CHECKING([for subshell support])
459 AC_ARG_WITH(subshell,
460         [--with-subshell=optional   To disable concurrent shell by default
461 --without-subshell         To disable concurrent shell completely],
462         [result=no
463         if test x$withval = xoptional
464         then
465                 AC_DEFINE(SUBSHELL_OPTIONAL, 1,
466                           [Define to make subshell support optional])
467                 AC_DEFINE(HAVE_SUBSHELL_SUPPORT, 1,
468                           [Define to enable subshell support])
469                 result="optional"
470         fi
471         if test x$withval = xyes
472         then 
473                 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
474                 result="yes"
475         fi],
476         [dnl Default: provide the subshell support on non-ultrix machines
477         case $host_os in
478         ultrix*)
479                 result=no
480                 ;;
481         *)
482                 AC_DEFINE(HAVE_SUBSHELL_SUPPORT)
483                 result=yes
484                 ;;
485         esac
487 AC_MSG_RESULT([$result])
488 subshell="$result"
491 dnl Memory Allocation Debugger
493 mem_debug="none"
494 AC_ARG_WITH(mad,
495 [--with-mad                 Developers only: activates MAD (memory debugger)],
496         [if test x$withval = xyes; then
497         mem_debug="Janne's MAD library"
498         AC_DEFINE(HAVE_MAD, 1,
499                   [Define to use Memory Allocation Debugger (MAD)])
500         AC_MSG_NOTICE([compiling with memory leak detector])
501 fi])
504 dnl Electric Fence - another memory debugger
506 AC_ARG_WITH(efence, 
507 [--with-efence              Developers only: activates Electric Fence],
508         [if test x$withval = xyes; then
509         LIBS="$LIBS -lefence"
510         AC_MSG_NOTICE([compiling with Electric fence])
511         mem_debug="Electric Fence"
512 fi])
514 slang_check_lib=true
515 slang_term=""
516 slang_use_system_installed_lib=false
517 AC_CHECK_LIB(slang,SLang_init_tty,
518         [AC_CHECK_HEADERS(slang.h)
519         if test x$ac_cv_header_slang_h = xyes
520         then
521              slang_use_system_installed_lib=true
522              slang_check_lib=false
523         else
524              AC_CHECK_HEADERS(slang/slang.h)
525              if test x$ac_cv_header_slang_slang_h = xyes
526              then
527                  slang_use_system_installed_lib=true
528                  slang_check_lib=false
529              fi
530         fi
533 AC_ARG_WITH(terminfo,
534         [--with-terminfo            SLANG: Force usage of terminfo],[
535         if test x$withval = xyes; then
536                 AC_USE_TERMINFO
537                 slang_check_lib=false
538                 slang_use_system_installed_lib=false
539         fi]
542 AC_ARG_WITH(termcap,
543         [--with-termcap             SLANG: Force usage of termcap],[
544         if test x$withval = xyes; then
545                 AC_USE_TERMCAP
546                 slang_check_lib=false
547                 slang_use_system_installed_lib=false
548         fi]
551 AC_ARG_WITH(included-slang,
552         [--with-included-slang      SLANG: use the SLang library included here],[
553         if test x$withval = xyes; then
554             slang_use_system_installed_lib=false
555             slang_check_lib=true
556         fi]
559 AC_ARG_WITH(slang,
560         [--with-slang              Compile with the slang screen manager],[
561         if test x$withval = xyes; then
562                 AC_WITH_SLANG
563         fi
566 LIBEDIT_A=""
567 MCEDIT=""
568 LEDIT=""
569 EDIT_msg=""
570 AC_ARG_WITH(edit,
571         [--with-edit                Enable internal editor],
572         [if test x$withval = xyes
573         then
574                 AC_WITH_EDIT
575         else
576                 EDIT_msg="no"
577         fi], 
578         [dnl Default: provide the internal editor
579         AC_WITH_EDIT
581 AC_SUBST(LIBEDIT_A)
582 AC_SUBST(MCEDIT)
583 AC_SUBST(LEDIT)
585 AC_ARG_WITH(netrc,
586         [--with-netrc               Compile with ftp .netrc support],[
587         if test x$withval = xyes; then
588                 AC_DEFINE(USE_NETRC, 1,
589                           [Define to use .netrc for FTP connections])
590                 AC_MSG_NOTICE([ftpfs will use .netrc])
591         fi
594 undelfs_o=""
596 if test $use_vfs = yes; then
597     AC_ARG_WITH(ext2undel,
598         [--with-ext2undel           Compile with ext2 undelete code],[
599         if test x$withval != xno;
600         then
601                 if test x$withval != xyes
602                 then
603                         LIBS="$LIBS -L$withval/lib"
604                         CPPFLAGS="$CPPFLAGS -I$withval/include"
605                 fi
606                 AC_EXT2_UNDEL
607         fi],[
608         dnl Default: detect
609         AC_CHECK_LIB(ext2fs, ext2fs_close, [AC_EXT2_UNDEL], , [-lcom_err])
610     ])
613 AC_SUBST(undelfs_o)
614         
615 if $search_ncurses
616 then
617     AC_MSG_NOTICE([checking location of ncurses.h file])
619     AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
620     AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
621     AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
622     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")
624     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")
626     AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
630 dnl Ncurses specific checks
632 dnl If ncurses exports the ESCDELAY variable it should be set to 0
633 dnl or you'll have to press Esc three times to dismiss a dialog box.
635 if test -n "$ncurses_version"; then
636   save_LIBS="$LIBS"
637   LIBS="$MCLIBS $LIBS"
638   AC_CACHE_CHECK([for ESCDELAY variable],
639                  [mc_cv_ncurses_escdelay],
640                  [AC_TRY_COMPILE([], [
641                         extern int ESCDELAY;
642                         int main ()
643                         {
644                           ESCDELAY = 0;
645                         }
646                         ],
647                         [mc_cv_ncurses_escdelay=yes],
648                         [mc_cv_ncurses_escdelay=no]
649                   )
650   ])
651   if test "$mc_cv_ncurses_escdelay" = yes; then
652     AC_DEFINE(HAVE_ESCDELAY, 1,
653               [Define if ncurses has ESCDELAY variable])
654   fi
656   AC_CHECK_FUNCS(resizeterm)
657   LIBS="$save_LIBS"
660 if test "x$screen_manager" = "xunknown"; then
661     AC_WITH_SLANG
665 dnl The variables used for expanding the auto saver.
667 cons_saver=""
668 install_saver="no"
669 PAMLIBS=""
670 case $host_os in
671 linux*)
672     cons_saver="cons.saver"
673     install_saver="yes"
675     dnl
676     dnl On Linux, check for PAM authentication available
677     dnl
678     AC_CHECK_LIB(pam, pam_start, [
679         AC_DEFINE(HAVE_PAM, 1,
680                   [Define if PAM (Pluggable Authentication Modules) is available])
681         PAMLIBS="-lpam -ldl"
682     ],[],[-ldl])
683     ;;
684 esac
685 AC_SUBST(cons_saver)
686 AC_SUBST(PAMLIBS)
689 dnl User visible support for charset conversion.
691 AC_ARG_ENABLE([charset],
692               [--enable-charset           Support for charset selection and conversion])
693 have_charset=
694 if test "x$enable_charset" = xyes; then
695   if test -z "$am_cv_func_iconv"; then
696     AC_MSG_WARN([Cannot enable charset support because iconv function is missing])
697   else
698     AC_DEFINE(HAVE_CHARSET, 1,
699               [Define to enable charset selection and conversion])
700     have_charset=yes
701   fi
706 dnl This code should be moved to the ac_WITH_SLANG
708 dnl We check for the existance of setupterm on curses library
709 dnl this is required to load certain definitions on some termcaps
710 dnl editions (AIX and OSF/1 I seem to remember).
711 dnl Note that we avoid using setupterm 
712 case $screen_manager in
713 SLang*)
714         case $host_os in
715         linux*)
716                 ;;
717         *)
718                 AC_CHECK_LIB(curses,setupterm,
719                         [AC_TRY_COMPILE([
720 #include <curses.h>
721 #include <term.h>],[
722    if (key_end == parm_insert_line)
723         return 1;
724    return 0;
726                         [MCLIBS="$MCLIBS -lcurses"
727                         AC_DEFINE(USE_SETUPTERM, 1,
728                                   [Define to use function `setupterm'
729 from `curses' library in S-Lang])])
730                 ])
731         esac
732         ;;
733 esac
735 LIBS="$LIBS $posix_libs"
737 AC_SUBST(CFLAGS)
738 AC_SUBST(CPPFLAGS)
739 AC_SUBST(LDFLAGS)
740 AC_SUBST(LIBS)
742 if test "x$SAMBAFILES" != x; then
743   AC_CONFIG_SUBDIRS([vfs/samba])
746 AM_CONDITIONAL(USE_EDIT, [test -n "$LIBEDIT_A"])
747 AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes])
748 AM_CONDITIONAL(USE_VFS_NET, [test -n "$NETFILES"])
749 AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$undelfs_o"])
750 AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$SAMBAFILES"])
751 AM_CONDITIONAL(MCSERV_INSTALL,
752                [test "x$enable_mcserv_install$mcserv" = xyesmcserv])
753 AM_CONDITIONAL(INCLUDED_SLANG,
754                [test "x$slang_use_system_installed_lib" = xfalse])
755 AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
756 AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
758 AH_BOTTOM([#include <extraconf.h>])
760 AC_CONFIG_FILES([
761 Makefile 
762 mc.spec
763 doc/Makefile 
764 vfs/Makefile
765 vfs/extfs/Makefile
766 lib/Makefile
767 src/Makefile
768 slang/Makefile 
769 edit/Makefile 
770 syntax/Makefile
771 pc/Makefile
773 lib/mc.ext
774 lib/mc.sh
775 lib/mc.csh
777 mcfn_install
779 vfs/extfs/deb
780 vfs/extfs/ftplist
781 vfs/extfs/lslR
782 vfs/extfs/uar
783 vfs/extfs/ucpio
784 vfs/extfs/ulha 
785 vfs/extfs/uha
786 vfs/extfs/urar
787 vfs/extfs/uzoo
789 doc/mc.1 doc/mcedit.1 doc/mcserv.8
791 intl/Makefile po/Makefile.in
794 AC_CONFIG_COMMANDS(potfiles,
795     [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
797 AC_OUTPUT
799 case $screen_manager in
800 SLang*)
801     screen_manager="${screen_manager}${slang_term}" ;;
802 esac
804 echo "
805 Configuration:
807   Source code location:       ${srcdir}
808   Compiler:                   ${CC}
809   Compiler flags:             ${CFLAGS}
810   File system:                ${vfs_type}
811                               ${vfs_flags}
812   Screen manager:             ${screen_manager}
813   Install console saver:      ${install_saver}
814   Mouse support:              ${mouse_lib}
815   X11 events support:         ${textmode_x11_support}
816   Debugger code:              ${mem_debug}
817   With subshell support:      ${subshell}
818   Internal editor:            ${EDIT_msg}
819   Install path:               ${prefix}/bin, ${prefix}/lib/mc